* [PATCH net-next] net: phylink: fix regression when binding a PHY
@ 2025-01-20 10:28 Russell King (Oracle)
2025-01-20 16:12 ` Simon Horman
2025-01-21 0:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2025-01-20 10:28 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phylink: fix regression when binding a PHY
2025-01-20 10:28 [PATCH net-next] net: phylink: fix regression when binding a PHY Russell King (Oracle)
@ 2025-01-20 16:12 ` Simon Horman
2025-01-21 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-01-20 16:12 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Heiner Kallweit, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev
On Mon, Jan 20, 2025 at 10:28:54AM +0000, Russell King (Oracle) wrote:
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phylink: fix regression when binding a PHY
2025-01-20 10:28 [PATCH net-next] net: phylink: fix regression when binding a PHY Russell King (Oracle)
2025-01-20 16:12 ` Simon Horman
@ 2025-01-21 0:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-01-21 0:40 UTC (permalink / raw)
To: Russell King; +Cc: andrew, hkallweit1, davem, edumazet, kuba, pabeni, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 20 Jan 2025 10:28:54 +0000 you wrote:
> 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>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-21 0:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-20 10:28 [PATCH net-next] net: phylink: fix regression when binding a PHY Russell King (Oracle)
2025-01-20 16:12 ` Simon Horman
2025-01-21 0:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).