
bfc17c1658353 net: phy: realtek: disable PHY-mode EEE fabcfd6d10999 net: phy: realtek: add defines for shadowed c45 standard registers 8af2136e77989 net: phy: realtek: add helper RTL822X_VND2_C22_REG 02d3b306ac2f0 net: phy: realtek: switch from paged to MMD ops in rtl822x functions da681ed73fb98 net: phy: realtek: improve mmd register access for internal PHY's 0bea93fdbaf86 net: phy: realtek: use string choices helpers 51773846fab24 net: phy: realtek: make HWMON support a user-visible Kconfig symbol Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit 7673a165a955269773eb604d3678d86d0bb7f49c)
55 lines
1.8 KiB
Diff
55 lines
1.8 KiB
Diff
From bfc17c1658353f22843c7c13e27c2d31950f1887 Mon Sep 17 00:00:00 2001
|
|
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
|
|
Date: Sun, 16 Mar 2025 12:39:54 +0000
|
|
Subject: [PATCH] net: phy: realtek: disable PHY-mode EEE
|
|
|
|
Realtek RTL8211F has a "PHY-mode" EEE support which interferes with an
|
|
IEEE 802.3 compliant implementation. This mode defaults to enabled, and
|
|
results in the MAC receive path not seeing the link transition to LPI
|
|
state.
|
|
|
|
Fix this by disabling PHY-mode EEE.
|
|
|
|
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
|
|
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
|
|
Link: https://patch.msgid.link/E1ttnHW-00785s-Uq@rmk-PC.armlinux.org.uk
|
|
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
|
---
|
|
drivers/net/phy/realtek/realtek_main.c | 11 +++++++++--
|
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
|
|
|
--- a/drivers/net/phy/realtek/realtek_main.c
|
|
+++ b/drivers/net/phy/realtek/realtek_main.c
|
|
@@ -33,6 +33,9 @@
|
|
|
|
#define RTL8211F_PHYCR1 0x18
|
|
#define RTL8211F_PHYCR2 0x19
|
|
+#define RTL8211F_CLKOUT_EN BIT(0)
|
|
+#define RTL8211F_PHYCR2_PHY_EEE_ENABLE BIT(5)
|
|
+
|
|
#define RTL8211F_INSR 0x1d
|
|
|
|
#define RTL8211F_LEDCR 0x10
|
|
@@ -55,8 +58,6 @@
|
|
#define RTL8211E_TX_DELAY BIT(12)
|
|
#define RTL8211E_RX_DELAY BIT(11)
|
|
|
|
-#define RTL8211F_CLKOUT_EN BIT(0)
|
|
-
|
|
#define RTL8201F_ISR 0x1e
|
|
#define RTL8201F_ISR_ANERR BIT(15)
|
|
#define RTL8201F_ISR_DUPLEX BIT(13)
|
|
@@ -453,6 +454,12 @@ static int rtl8211f_config_init(struct p
|
|
str_enabled_disabled(val_rxdly));
|
|
}
|
|
|
|
+ /* Disable PHY-mode EEE so LPI is passed to the MAC */
|
|
+ ret = phy_modify_paged(phydev, 0xa43, RTL8211F_PHYCR2,
|
|
+ RTL8211F_PHYCR2_PHY_EEE_ENABLE, 0);
|
|
+ if (ret)
|
|
+ return ret;
|
|
+
|
|
if (priv->has_phycr2) {
|
|
ret = phy_modify_paged(phydev, 0xa43, RTL8211F_PHYCR2,
|
|
RTL8211F_CLKOUT_EN, priv->phycr2);
|