mirror of
https://github.com/openwrt/openwrt.git
synced 2026-04-23 15:48:44 +04:00
Replace downstream hack disabling SGMII in-band AN on the MediaTek platform with pending upstream patch announcing in-band AN capabilities and implementing configuring in-band AN in the PHY driver. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
57 lines
1.8 KiB
Diff
57 lines
1.8 KiB
Diff
From 081156ce13f8fa4e97b5148dc54d8c0ddf02117b Mon Sep 17 00:00:00 2001
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
|
Date: Thu, 20 Nov 2025 15:02:19 +0000
|
|
Subject: [PATCH] net: phy: mxl-gpy: fix link properties on USXGMII and
|
|
internal PHYs
|
|
|
|
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>
|
|
Link: https://patch.msgid.link/71fccf3f56742116eb18cc070d2a9810479ea7f9.1763650701.git.daniel@makrotopia.org
|
|
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
---
|
|
drivers/net/phy/mxl-gpy.c | 18 +++++++++++-------
|
|
1 file changed, 11 insertions(+), 7 deletions(-)
|
|
|
|
--- a/drivers/net/phy/mxl-gpy.c
|
|
+++ b/drivers/net/phy/mxl-gpy.c
|
|
@@ -584,13 +584,7 @@ static int gpy_update_interface(struct p
|
|
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)
|
|
@@ -645,6 +639,16 @@ static int gpy_read_status(struct phy_de
|
|
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;
|