summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Buchwitz <nb@tipi-net.de>2026-04-06 10:13:09 +0300
committerJakub Kicinski <kuba@kernel.org>2026-04-12 21:33:23 +0300
commitbb14e3b63c63a48307843c82180bc8abb34e1acc (patch)
tree03c239902b0a9275636774c48f93a46648137dd4
parentbcb3e89fc0ecbe7a2b7ce614b72deda39083ac74 (diff)
downloadlinux-bb14e3b63c63a48307843c82180bc8abb34e1acc.tar.xz
net: phy: realtek: convert RTL8211F to .disable_autonomous_eee
The RTL8211F previously unconditionally disabled PHY-mode EEE in config_init. Convert this to use the new .disable_autonomous_eee callback so it is only disabled when the MAC indicates EEE support via phy_support_eee(). This preserves PHY-autonomous EEE for MACs that do not support EEE, while still disabling it when the MAC manages LPI. Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de> Link: https://patch.msgid.link/20260406-devel-autonomous-eee-v1-3-b335e7143711@tipi-net.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/phy/realtek/realtek_main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
index bdb1221023fb..9c26531abe4a 100644
--- a/drivers/net/phy/realtek/realtek_main.c
+++ b/drivers/net/phy/realtek/realtek_main.c
@@ -726,9 +726,8 @@ static int rtl8211f_config_aldps(struct phy_device *phydev)
return phy_modify(phydev, RTL8211F_PHYCR1, mask, mask);
}
-static int rtl8211f_config_phy_eee(struct phy_device *phydev)
+static int rtl8211f_disable_autonomous_eee(struct phy_device *phydev)
{
- /* Disable PHY-mode EEE so LPI is passed to the MAC */
return phy_modify(phydev, RTL8211F_PHYCR2,
RTL8211F_PHYCR2_PHY_EEE_ENABLE, 0);
}
@@ -866,7 +865,7 @@ static int rtl8211f_config_init(struct phy_device *phydev)
return ret;
}
- return rtl8211f_config_phy_eee(phydev);
+ return 0;
}
static int rtl821x_suspend(struct phy_device *phydev)
@@ -2460,6 +2459,7 @@ static struct phy_driver realtek_drvs[] = {
.led_hw_is_supported = rtl8211x_led_hw_is_supported,
.led_hw_control_get = rtl8211f_led_hw_control_get,
.led_hw_control_set = rtl8211f_led_hw_control_set,
+ .disable_autonomous_eee = rtl8211f_disable_autonomous_eee,
}, {
PHY_ID_MATCH_EXACT(RTL_8211FVD_PHYID),
.name = "RTL8211F-VD Gigabit Ethernet",
@@ -2476,6 +2476,7 @@ static struct phy_driver realtek_drvs[] = {
.led_hw_is_supported = rtl8211x_led_hw_is_supported,
.led_hw_control_get = rtl8211f_led_hw_control_get,
.led_hw_control_set = rtl8211f_led_hw_control_set,
+ .disable_autonomous_eee = rtl8211f_disable_autonomous_eee,
}, {
.name = "Generic FE-GE Realtek PHY",
.match_phy_device = rtlgen_match_phy_device,