net: phylink: fix regression when binding a PHY
Subsystems (4)
PATCH 1/1 net: phylink: fix regression when binding a PHY
Some PHYs don't support clause 45 access, and return -EOPNOTSUPP from phy_modify_mmd(), which causes phylink_bringup_phy() to fail. Prevent this failure by allowing -EOPNOTSUPP to also mean success.
--- drivers/net/phy/phylink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/phy/phylink.c +5 -1
@@ -2268,7 +2268,11 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,/* Explicitly configure whether the PHY is allowed to stop it's * receive clock. */ -return phy_eee_rx_clock_stop (phy, pl->config->eee_rx_clk_stop_enable); + ret =phy_eee_rx_clock_stop (phy, pl->config->eee_rx_clk_stop_enable); +if (ret == -EOPNOTSUPP ) + ret =0 ; + +return ret; } static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy,
Signature · 1 line
2.30.2
Quoted 7 lines · Russell King (Oracle)
Some PHYs don't support clause 45 access, and return
-EOPNOTSUPPfromphy_modify_mmd(), which causesphylink_bringup_phy()to fail. Prevent this failure by allowing-EOPNOTSUPPto also mean success.Reported-by Jiawen Wu <[email protected]>Tested-by Jiawen Wu <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Mon, 20 Jan 2025 10:28:54 +0000 you wrote:
Some PHYs don't support clause 45 access, and return
-EOPNOTSUPPfromphy_modify_mmd(), which causesphylink_bringup_phy()to fail. Prevent this failure by allowing-EOPNOTSUPPto also mean success.Reported-by Jiawen Wu <[email protected]>Tested-by Jiawen Wu <[email protected]>Signed-off-by Russell King (Oracle) <[email protected]>[...]
Here is the summary with links:
- [net-next] net: phylink: fix regression when binding a PHY
https://git.kernel.org/netdev/net-next/c/b1754a69e7be
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html