[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <E1tZp1a-001V62-DT@rmk-PC.armlinux.org.uk>
Date: Mon, 20 Jan 2025 10:28:54 +0000
From: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org
Subject: [PATCH net-next] 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@...stnetic.com>
Tested-by: Jiawen Wu <jiawenwu@...stnetic.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
---
drivers/net/phy/phylink.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 66eea3f963d3..56d411bb2547 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,
--
2.30.2
Powered by blists - more mailing lists