summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Stockhausen2025-08-27 17:51:55 +0000
committerHauke Mehrtens2025-08-29 22:50:29 +0000
commita43330799b73522045335bb44c6808e931936022 (patch)
tree154d150a5aa1a08f9dc661ed912658a9c200c627
parenta3d681d7f5dcb6cf9142a50e6ea55f79f25d276e (diff)
downloadopenwrt-a43330799b73522045335bb44c6808e931936022.tar.gz
generic: fix c45 soft reset for RTL8221B
The addition of the soft_reset() function to the RTL8221B PHYs missed to take care of C22/C45 standalone PHY versions. Especially on RTL930x switch devices with these PHY the reset fails for the C45 operation mode. This comes from the fact that the mdio bus disables C22 read/writes when being set to C45. Upstream has gained a proper C45 reset function. Use it for the C45 PHY models. Fixes: 7e3284eef7f ("generic: use genphy_soft_reset for RealTek 2.5G PHYs") Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/19843 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch4
-rw-r--r--target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch4
-rw-r--r--target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch4
3 files changed, 6 insertions, 6 deletions
diff --git a/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch b/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
index abe7478a65..9bb5737b39 100644
--- a/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
+++ b/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
@@ -51,7 +51,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
}, {
.match_phy_device = rtl8221b_vb_cg_c45_match_phy_device,
.name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
-+ .soft_reset = genphy_soft_reset,
++ .soft_reset = rtl822x_c45_soft_reset,
.probe = rtl822x_probe,
.config_init = rtl822xb_config_init,
.get_rate_matching = rtl822xb_get_rate_matching,
@@ -67,7 +67,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
}, {
.match_phy_device = rtl8221b_vn_cg_c45_match_phy_device,
.name = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
-+ .soft_reset = genphy_soft_reset,
++ .soft_reset = rtl822x_c45_soft_reset,
.probe = rtl822x_probe,
.config_init = rtl822xb_config_init,
.get_rate_matching = rtl822xb_get_rate_matching,
diff --git a/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index bac46cbeef..855ea41c8c 100644
--- a/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -79,7 +79,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
.name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
+ .config_intr = rtl8221b_config_intr,
+ .handle_interrupt = rtl8221b_handle_interrupt,
- .soft_reset = genphy_soft_reset,
+ .soft_reset = rtl822x_c45_soft_reset,
.probe = rtl822x_probe,
.config_init = rtl822xb_config_init,
@@ -1800,6 +1849,8 @@ static struct phy_driver realtek_drvs[]
@@ -97,6 +97,6 @@ Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
.name = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
+ .config_intr = rtl8221b_config_intr,
+ .handle_interrupt = rtl8221b_handle_interrupt,
- .soft_reset = genphy_soft_reset,
+ .soft_reset = rtl822x_c45_soft_reset,
.probe = rtl822x_probe,
.config_init = rtl822xb_config_init,
diff --git a/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch b/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
index ceb67c2379..e451d13bd8 100644
--- a/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
+++ b/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
@@ -40,7 +40,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
{
@@ -1842,7 +1858,7 @@ static struct phy_driver realtek_drvs[]
.handle_interrupt = rtl8221b_handle_interrupt,
- .soft_reset = genphy_soft_reset,
+ .soft_reset = rtl822x_c45_soft_reset,
.probe = rtl822x_probe,
- .config_init = rtl822xb_config_init,
+ .config_init = rtl822xb_config_init_war,
@@ -49,7 +49,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
.config_aneg = rtl822x_c45_config_aneg,
@@ -1872,7 +1888,7 @@ static struct phy_driver realtek_drvs[]
.handle_interrupt = rtl8221b_handle_interrupt,
- .soft_reset = genphy_soft_reset,
+ .soft_reset = rtl822x_c45_soft_reset,
.probe = rtl822x_probe,
- .config_init = rtl822xb_config_init,
+ .config_init = rtl822xb_config_init_war,