diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2025-01-20 11:28:54 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-01-21 01:32:42 +0100 |
commit | b1754a69e7be48a64b3cdb0df60a96d97959da73 (patch) | |
tree | 83a4b2dd842ca069d91edf67c82fa7a778605736 /drivers/net/phy/phylink.c | |
parent | Merge branch 'net-ethernet-ti-am65-cpsw-streamline-rx-tx-queue-creation-and-c... (diff) | |
download | linux-b1754a69e7be48a64b3cdb0df60a96d97959da73.tar.xz linux-b1754a69e7be48a64b3cdb0df60a96d97959da73.zip |
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 <jiawenwu@trustnetic.com>
Tested-by: Jiawen Wu <jiawenwu@trustnetic.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/E1tZp1a-001V62-DT@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/phy/phylink.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index d130634d3bc7..214b62fba991 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -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, |