]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 12 May 2025 11:44:22 +0000 (14:44 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 15 May 2025 02:41:46 +0000 (19:41 -0700)
commit4cde0e4224ce70bb6e91930a8850b59194151838
tree3b7901f1c0fbd8d9a80565d7dea9fb80d7d856df
parent36d9b54258098f6ea96a7c400577a17f1c1f9fce
net: cpsw: isolate cpsw_ndo_ioctl() to just the old driver

cpsw->slaves[slave_no].phy should be equal to netdev->phydev, because it
is assigned from phy_attach_direct(). The latter is indirectly called
from the two identically named cpsw_slave_open() functions, one in
cpsw.c and another in cpsw_new.c.

Thus, the driver should not need custom logic to find the PHY, the core
can find it, and phy_do_ioctl_running() achieves exactly that.

However, that is only the case for cpsw_new and for the cpsw driver in
dual EMAC mode. This is explained in more detail in the previous commit.
Thus, allow the simpler core logic to execute for cpsw_new, and move
cpsw_ndo_ioctl() to cpsw.c.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20250512114422.4176010-2-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ti/cpsw.c
drivers/net/ethernet/ti/cpsw_new.c
drivers/net/ethernet/ti/cpsw_priv.c
drivers/net/ethernet/ti/cpsw_priv.h