* [PATCH net] net: phy: mxl-gpy: fix link properties on USXGMII and internal PHYs
@ 2025-11-20 15:02 Daniel Golle
2025-11-25 11:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Golle @ 2025-11-20 15:02 UTC (permalink / raw)
To: Xu Liang, Andrew Lunn, Heiner Kallweit, Russell King,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, linux-kernel
gpy_update_interface() returns early in case the PHY is internal or
connected via USXGMII. In this case the gigabit master/slave property
as well as MDI/MDI-X status also won't be read which seems wrong.
Always read those properties by moving the logic to retrieve them to
gpy_read_status().
Fixes: fd8825cd8c6fc ("net: phy: mxl-gpy: Add PHY Auto/MDI/MDI-X set driver for GPY211 chips")
Fixes: 311abcdddc00a ("net: phy: add support to get Master-Slave configuration")
Suggested-by: "Russell King (Oracle)" <linux@armlinux.org.uk>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/phy/mxl-gpy.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/phy/mxl-gpy.c b/drivers/net/phy/mxl-gpy.c
index 221b315203d06..2a873f791733a 100644
--- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c
@@ -578,13 +578,7 @@ static int gpy_update_interface(struct phy_device *phydev)
break;
}
- if (phydev->speed == SPEED_2500 || phydev->speed == SPEED_1000) {
- ret = genphy_read_master_slave(phydev);
- if (ret < 0)
- return ret;
- }
-
- return gpy_update_mdix(phydev);
+ return 0;
}
static int gpy_read_status(struct phy_device *phydev)
@@ -639,6 +633,16 @@ static int gpy_read_status(struct phy_device *phydev)
ret = gpy_update_interface(phydev);
if (ret < 0)
return ret;
+
+ if (phydev->speed == SPEED_2500 || phydev->speed == SPEED_1000) {
+ ret = genphy_read_master_slave(phydev);
+ if (ret < 0)
+ return ret;
+ }
+
+ ret = gpy_update_mdix(phydev);
+ if (ret < 0)
+ return ret;
}
return 0;
--
2.51.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: phy: mxl-gpy: fix link properties on USXGMII and internal PHYs
2025-11-20 15:02 [PATCH net] net: phy: mxl-gpy: fix link properties on USXGMII and internal PHYs Daniel Golle
@ 2025-11-25 11:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-25 11:50 UTC (permalink / raw)
To: Daniel Golle
Cc: lxu, andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
netdev, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 20 Nov 2025 15:02:19 +0000 you wrote:
> gpy_update_interface() returns early in case the PHY is internal or
> connected via USXGMII. In this case the gigabit master/slave property
> as well as MDI/MDI-X status also won't be read which seems wrong.
> Always read those properties by moving the logic to retrieve them to
> gpy_read_status().
>
> Fixes: fd8825cd8c6fc ("net: phy: mxl-gpy: Add PHY Auto/MDI/MDI-X set driver for GPY211 chips")
> Fixes: 311abcdddc00a ("net: phy: add support to get Master-Slave configuration")
> Suggested-by: "Russell King (Oracle)" <linux@armlinux.org.uk>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
>
> [...]
Here is the summary with links:
- [net] net: phy: mxl-gpy: fix link properties on USXGMII and internal PHYs
https://git.kernel.org/netdev/net/c/081156ce13f8
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] 2+ messages in thread
end of thread, other threads:[~2025-11-25 11:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-20 15:02 [PATCH net] net: phy: mxl-gpy: fix link properties on USXGMII and internal PHYs Daniel Golle
2025-11-25 11:50 ` 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).