* [PATCH net] net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY
@ 2025-11-20 14:17 Daniel Golle
2025-11-20 14:26 ` Maxime Chevallier
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel Golle @ 2025-11-20 14:17 UTC (permalink / raw)
To: Xu Liang, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Raju Lakkaraju, netdev, linux-kernel
As the interface mode doesn't need to be updated on PHYs connected with
USXGMII and integrated PHYs, gpy_update_interface() should just return 0
in these cases rather than -EINVAL which has wrongly been introduced by
commit 7a495dde27ebc ("net: phy: mxl-gpy: Change gpy_update_interface()
function return type"), as this breaks support for those PHYs.
Fixes: 7a495dde27ebc ("net: phy: mxl-gpy: Change gpy_update_interface() function return type")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/phy/mxl-gpy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
index 0daf0e86844a0..0058284b08f3b 100644
--- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c
@@ -541,7 +541,7 @@ static int gpy_update_interface(struct phy_device *phydev)
/* Interface mode is fixed for USXGMII and integrated PHY */
if (phydev->interface == PHY_INTERFACE_MODE_USXGMII ||
phydev->interface == PHY_INTERFACE_MODE_INTERNAL)
- return -EINVAL;
+ return 0;
/* Automatically switch SERDES interface between SGMII and 2500-BaseX
* according to speed. Disable ANEG in 2500-BaseX mode.
--
2.51.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY
2025-11-20 14:17 [PATCH net] net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY Daniel Golle
@ 2025-11-20 14:26 ` Maxime Chevallier
2025-11-20 14:43 ` Russell King (Oracle)
2025-11-22 2:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Maxime Chevallier @ 2025-11-20 14:26 UTC (permalink / raw)
To: Daniel Golle, Xu Liang, Andrew Lunn, Heiner Kallweit,
Russell King, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Raju Lakkaraju, netdev, linux-kernel
On 20/11/2025 15:17, Daniel Golle wrote:
> As the interface mode doesn't need to be updated on PHYs connected with
> USXGMII and integrated PHYs, gpy_update_interface() should just return 0
> in these cases rather than -EINVAL which has wrongly been introduced by
> commit 7a495dde27ebc ("net: phy: mxl-gpy: Change gpy_update_interface()
> function return type"), as this breaks support for those PHYs.
>
> Fixes: 7a495dde27ebc ("net: phy: mxl-gpy: Change gpy_update_interface() function return type")
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
That looks correct indeed :)
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
> ---
> drivers/net/phy/mxl-gpy.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
> index 0daf0e86844a0..0058284b08f3b 100644
> --- a/drivers/net/phy/mxl-gpy.c
> +++ b/drivers/net/phy/mxl-gpy.c
> @@ -541,7 +541,7 @@ static int gpy_update_interface(struct phy_device *phydev)
> /* Interface mode is fixed for USXGMII and integrated PHY */
> if (phydev->interface == PHY_INTERFACE_MODE_USXGMII ||
> phydev->interface == PHY_INTERFACE_MODE_INTERNAL)
> - return -EINVAL;
> + return 0;
>
> /* Automatically switch SERDES interface between SGMII and 2500-BaseX
> * according to speed. Disable ANEG in 2500-BaseX mode.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY
2025-11-20 14:17 [PATCH net] net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY Daniel Golle
2025-11-20 14:26 ` Maxime Chevallier
@ 2025-11-20 14:43 ` Russell King (Oracle)
2025-11-22 2:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2025-11-20 14:43 UTC (permalink / raw)
To: Daniel Golle
Cc: Xu Liang, Andrew Lunn, Heiner Kallweit, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Raju Lakkaraju, netdev,
linux-kernel
On Thu, Nov 20, 2025 at 02:17:13PM +0000, Daniel Golle wrote:
> As the interface mode doesn't need to be updated on PHYs connected with
> USXGMII and integrated PHYs, gpy_update_interface() should just return 0
> in these cases rather than -EINVAL which has wrongly been introduced by
> commit 7a495dde27ebc ("net: phy: mxl-gpy: Change gpy_update_interface()
> function return type"), as this breaks support for those PHYs.
I think there's more problems here. gpy_update_interface() does more
than just updating the interface, it also reads the master/slave and
mdix state at the end of the function. Returning early for interfaces
we don't means that we don't wish to update the interface for means
these don't get read. Since these are media-side and are irrespective
of the host-side interface, this seems buggy.
So, while this patch is correct, I think it would make sense to also
fix the other problems here.
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY
2025-11-20 14:17 [PATCH net] net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY Daniel Golle
2025-11-20 14:26 ` Maxime Chevallier
2025-11-20 14:43 ` Russell King (Oracle)
@ 2025-11-22 2:20 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-22 2:20 UTC (permalink / raw)
To: Daniel Golle
Cc: lxu, andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
Raju.Lakkaraju, netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 20 Nov 2025 14:17:13 +0000 you wrote:
> As the interface mode doesn't need to be updated on PHYs connected with
> USXGMII and integrated PHYs, gpy_update_interface() should just return 0
> in these cases rather than -EINVAL which has wrongly been introduced by
> commit 7a495dde27ebc ("net: phy: mxl-gpy: Change gpy_update_interface()
> function return type"), as this breaks support for those PHYs.
>
> Fixes: 7a495dde27ebc ("net: phy: mxl-gpy: Change gpy_update_interface() function return type")
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
>
> [...]
Here is the summary with links:
- [net] net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY
https://git.kernel.org/netdev/net/c/ec3803b5917b
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] 4+ messages in thread
end of thread, other threads:[~2025-11-22 2:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 14:17 [PATCH net] net: phy: mxl-gpy: fix bogus error on USXGMII and integrated PHY Daniel Golle
2025-11-20 14:26 ` Maxime Chevallier
2025-11-20 14:43 ` Russell King (Oracle)
2025-11-22 2:20 ` 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).