summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle2025-01-23 03:36:10 +0000
committerDaniel Golle2025-01-26 01:12:36 +0000
commitd30773abe8cc333137a964ffedf878cc425ac9ed (patch)
tree3f33efa0f9e68d9afd53dc3c13a46ad6237828e1
parent1e9966a63ae430a5c48039fd9752bf1c465325f3 (diff)
downloadopenwrt-d30773abe8cc333137a964ffedf878cc425ac9ed.tar.gz
generic: fix probe issues with RealTek RTL8221B PHYs
Import patch "net: phy: realtek: mark existing MMDs as present" When using Clause-45 mode to access RealTek RTL8221B 2.5G PHYs some versions of the PHY fail to report the MMDs present on the PHY. Mark MMDs PMAPMD, PCS and AN which are always existing according to the datasheet as present to fix that. Fixes: #16823, #17183, #17232 Signed-off-by: Daniel Golle <daniel@makrotopia.org> Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> Tested-by: Juan Pedro Paredes Caballero <juanpedro.paredes@gmail.com> (cherry picked from commit 730db6b893748517949b1d3a0c0cb8b6c1288040)
-rw-r--r--target/linux/generic/pending-6.6/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/generic/pending-6.6/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch b/target/linux/generic/pending-6.6/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch
new file mode 100644
index 0000000000..1ef42e866d
--- /dev/null
+++ b/target/linux/generic/pending-6.6/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch
@@ -0,0 +1,27 @@
+From 1addfb042a9d27788a0fb2c2935045b56fd8560e Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Thu, 23 Jan 2025 03:25:29 +0000
+Subject: [PATCH] net: phy: realtek: mark existing MMDs as present
+
+When using Clause-45 mode to access RealTek RTL8221B 2.5G PHYs some
+versions of the PHY fail to report the MMDs present on the PHY.
+Mark MMDs PMAPMD, PCS and AN which are always existing according to
+the datasheet as present to fix that.
+
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+---
+ drivers/net/phy/realtek/realtek_main.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/net/phy/realtek/realtek_main.c
++++ b/drivers/net/phy/realtek/realtek_main.c
+@@ -1034,6 +1034,9 @@ static int rtl822x_c45_get_features(stru
+ linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT,
+ phydev->supported);
+
++ phydev->c45_ids.mmds_present |= MDIO_DEVS_PMAPMD | MDIO_DEVS_PCS |
++ MDIO_DEVS_AN;
++
+ return genphy_c45_pma_read_abilities(phydev);
+ }
+