]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: phy: move phy_link_change() prior to mdio_bus_phy_may_suspend()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 7 Apr 2025 09:38:59 +0000 (12:38 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:09 +0000 (10:15 +0200)
commit6d98cd63426e35208a380ab43afeb9184bb29477
tree1feec5ca6c8d9b3a611d60b89bbb6b0ef5e27252
parentaa5a1e4b882964eb79d5b5d1d1e8a1a5efbb1d15
net: phy: move phy_link_change() prior to mdio_bus_phy_may_suspend()

[ Upstream commit f40a673d6b4a128fe95dd9b8c3ed02da50a6a862 ]

In an upcoming change, mdio_bus_phy_may_suspend() will need to
distinguish a phylib-based PHY client from a phylink PHY client.
For that, it will need to compare the phydev->phy_link_change() function
pointer with the eponymous phy_link_change() provided by phylib.

To avoid forward function declarations, the default PHY link state
change method should be moved upwards. There is no functional change
associated with this patch, it is only to reduce the noise from a real
bug fix.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20250407093900.2155112-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: fc75ea20ffb4 ("net: phy: allow MDIO bus PM ops to start/stop state machine for phylink-controlled PHY")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/phy_device.c