2024-01-03 11:57:28 +00:00
|
|
|
From 85cd45580f5e3b26068cccb7d6173f200e754dc0 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
Date: Sun, 2 Apr 2023 23:56:16 +0100
|
|
|
|
Subject: [PATCH 1/2] net: phy: realtek: use genphy_soft_reset for 2.5G PHYs
|
|
|
|
|
|
|
|
Some vendor bootloaders do weird things with those PHYs which result in
|
|
|
|
link modes being reported wrongly. Start from a clean sheet by resetting
|
|
|
|
the PHY.
|
|
|
|
|
|
|
|
Reported-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
|
|
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
---
|
|
|
|
drivers/net/phy/realtek.c | 6 ++++++
|
|
|
|
1 file changed, 6 insertions(+)
|
|
|
|
|
|
|
|
--- a/drivers/net/phy/realtek.c
|
|
|
|
+++ b/drivers/net/phy/realtek.c
|
2024-06-24 17:22:51 +00:00
|
|
|
@@ -1218,6 +1218,7 @@ static struct phy_driver realtek_drvs[]
|
|
|
|
}, {
|
|
|
|
.name = "RTL8226 2.5Gbps PHY",
|
|
|
|
.match_phy_device = rtl8226_match_phy_device,
|
2024-01-03 11:57:28 +00:00
|
|
|
+ .soft_reset = genphy_soft_reset,
|
2024-06-24 17:22:51 +00:00
|
|
|
.get_features = rtl822x_get_features,
|
|
|
|
.config_aneg = rtl822x_config_aneg,
|
|
|
|
.read_status = rtl822x_read_status,
|
|
|
|
@@ -1230,6 +1231,7 @@ static struct phy_driver realtek_drvs[]
|
2024-01-03 11:57:28 +00:00
|
|
|
}, {
|
|
|
|
PHY_ID_MATCH_EXACT(0x001cc840),
|
|
|
|
.name = "RTL8226B_RTL8221B 2.5Gbps PHY",
|
|
|
|
+ .soft_reset = genphy_soft_reset,
|
2024-06-24 17:22:51 +00:00
|
|
|
.get_features = rtl822x_get_features,
|
|
|
|
.config_aneg = rtl822x_config_aneg,
|
|
|
|
.config_init = rtl822xb_config_init,
|
|
|
|
@@ -1244,6 +1246,7 @@ static struct phy_driver realtek_drvs[]
|
2024-01-03 11:57:28 +00:00
|
|
|
}, {
|
|
|
|
PHY_ID_MATCH_EXACT(0x001cc838),
|
|
|
|
.name = "RTL8226-CG 2.5Gbps PHY",
|
|
|
|
+ .soft_reset = genphy_soft_reset,
|
2024-06-24 17:22:51 +00:00
|
|
|
.get_features = rtl822x_get_features,
|
|
|
|
.config_aneg = rtl822x_config_aneg,
|
|
|
|
.read_status = rtl822x_read_status,
|
|
|
|
@@ -1254,6 +1257,7 @@ static struct phy_driver realtek_drvs[]
|
2024-01-03 11:57:28 +00:00
|
|
|
}, {
|
|
|
|
PHY_ID_MATCH_EXACT(0x001cc848),
|
|
|
|
.name = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY",
|
|
|
|
+ .soft_reset = genphy_soft_reset,
|
2024-06-24 17:22:51 +00:00
|
|
|
.get_features = rtl822x_get_features,
|
|
|
|
.config_aneg = rtl822x_config_aneg,
|
|
|
|
.config_init = rtl822xb_config_init,
|
|
|
|
@@ -1266,6 +1270,7 @@ static struct phy_driver realtek_drvs[]
|
|
|
|
}, {
|
|
|
|
.match_phy_device = rtl8221b_vb_cg_c22_match_phy_device,
|
|
|
|
.name = "RTL8221B-VB-CG 2.5Gbps PHY (C22)",
|
|
|
|
+ .soft_reset = genphy_soft_reset,
|
|
|
|
.get_features = rtl822x_get_features,
|
|
|
|
.config_aneg = rtl822x_config_aneg,
|
|
|
|
.config_init = rtl822xb_config_init,
|
|
|
|
@@ -1278,6 +1283,7 @@ static struct phy_driver realtek_drvs[]
|
2024-01-03 11:57:28 +00:00
|
|
|
}, {
|
2024-06-24 17:22:51 +00:00
|
|
|
.match_phy_device = rtl8221b_vb_cg_c45_match_phy_device,
|
|
|
|
.name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
|
2024-01-03 11:57:28 +00:00
|
|
|
+ .soft_reset = genphy_soft_reset,
|
2024-06-24 17:22:51 +00:00
|
|
|
.config_init = rtl822xb_config_init,
|
|
|
|
.get_rate_matching = rtl822xb_get_rate_matching,
|
|
|
|
.get_features = rtl822x_c45_get_features,
|
|
|
|
@@ -1288,6 +1294,7 @@ static struct phy_driver realtek_drvs[]
|
2024-01-03 11:57:28 +00:00
|
|
|
}, {
|
2024-06-24 17:22:51 +00:00
|
|
|
.match_phy_device = rtl8221b_vn_cg_c22_match_phy_device,
|
|
|
|
.name = "RTL8221B-VM-CG 2.5Gbps PHY (C22)",
|
2024-01-03 11:57:28 +00:00
|
|
|
+ .soft_reset = genphy_soft_reset,
|
2024-06-24 17:22:51 +00:00
|
|
|
.get_features = rtl822x_get_features,
|
|
|
|
.config_aneg = rtl822x_config_aneg,
|
|
|
|
.config_init = rtl822xb_config_init,
|
|
|
|
@@ -1300,6 +1307,7 @@ static struct phy_driver realtek_drvs[]
|
2024-01-03 11:57:28 +00:00
|
|
|
}, {
|
2024-06-24 17:22:51 +00:00
|
|
|
.match_phy_device = rtl8221b_vn_cg_c45_match_phy_device,
|
|
|
|
.name = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
|
|
|
|
+ .soft_reset = genphy_soft_reset,
|
|
|
|
.config_init = rtl822xb_config_init,
|
|
|
|
.get_rate_matching = rtl822xb_get_rate_matching,
|
|
|
|
.get_features = rtl822x_c45_get_features,
|