Skip to content

Commit b1754a6

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
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. Reported-by: Jiawen Wu <[email protected]> Tested-by: Jiawen Wu <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d73a460 commit b1754a6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/phy/phylink.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,11 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,
22682268
/* Explicitly configure whether the PHY is allowed to stop it's
22692269
* receive clock.
22702270
*/
2271-
return phy_eee_rx_clock_stop(phy, pl->config->eee_rx_clk_stop_enable);
2271+
ret = phy_eee_rx_clock_stop(phy, pl->config->eee_rx_clk_stop_enable);
2272+
if (ret == -EOPNOTSUPP)
2273+
ret = 0;
2274+
2275+
return ret;
22722276
}
22732277

22742278
static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy,

0 commit comments

Comments
 (0)