r8169: disable EEE on RTL8168h/8111h
PATCH 1/1 r8169: disable EEE on RTL8168h/8111h
Force EEE off on the RTL8168h/8111h (RTL_GIGA_MAC_VER_46) at PHY connect with phy_disable_eee().
Commit 202fef9bbbf5 ("net: phy: realtek: fix EEE advertisement write on the internal PHY MMD path") made EEE actually advertise on the generic Realtek PHY; the write had been a no-op before. On the RTL8168h that un-masks a latent defect: once EEE negotiates, RX silently stalls after ~7-20 minutes. The carrier stays up, no counter or dmesg moves, and only "ip link set down/up" recovers it; disabling EEE keeps the link stable.
Root-causing the RTL8168h LPI/RX path needs hardware not available now, so disable EEE for this version. Use phy_disable_eee() rather than dropping the version from rtl_supports_eee(): the latter also skips rtl_enable_tx_lpi(), whose disable branch clears the MAC TX-LPI bits (ERI 0x1b0[1:0]) on link up. rtl_hw_start_8168h_1() does not clear them (the RTL8402/RTL8106e init does), so a warm reboot from an EEE-active state could otherwise leave TX-LPI asserted while the PHY no longer negotiates EEE. Keeping the version EEE-capable preserves that clear path. This also covers the RTL8168M, which shares RTL_GIGA_MAC_VER_46.
--- drivers/net/ethernet/realtek/r8169_main.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/realtek/r8169_main.c +6 -0
@@ -5484,6 +5484,12 @@ static int r8169_mdio_register(struct rtl8169_private *tp)phy_disable_eee_mode (tp->phydev, ETHTOOL_LINK_MODE_2500baseT_Full_BIT); +/* Keep EEE off but the version stays EEE-capable so that link-up +* still clears the MAC TX-LPI bits. +*/ +if (tp->mac_version ==RTL_GIGA_MAC_VER_46 ) +phy_disable_eee (tp->phydev); +/* PHY will be woken up in rtl_open() */ phy_suspend (tp->phydev);
Signature · 1 line
2.47.3
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Fri, 25 Sep 2026 09:10:40 +0200 you wrote:
Force EEE off on the RTL8168h/8111h (
RTL_GIGA_MAC_VER_46) at PHY connect withphy_disable_eee().Commit
202fef9bbbf5("net: phy: realtek: fix EEE advertisement write on the internal PHY MMD path") made EEE actually advertise on the generic Realtek PHY; the write had been a no-op before. On the RTL8168h that un-masks a latent defect: once EEE negotiates, RX silently stalls after ~7-20 minutes. The carrier stays up, no counter or dmesg moves, and only "ip link set down/up" recovers it; disabling EEE keeps the link stable.[...]
Here is the summary with links:
- [net,v1,1/1] r8169: disable EEE on RTL8168h/8111h
https://git.kernel.org/netdev/net/c/3cdeaef1754a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Hi Oleksij,
I tested this on the affected machine with a Home Assistant OS test build that includes the patch (kernel 6.18.54-haos).
Hardware: Intel NUC11ATKPE, RTL8168h/8111h (XID 541), FRITZ!Box 6690 as link partner, no VLANs.
With the patch the NIC reports EEE as not supported and the RX stall is gone: more than 4 hours without a single drop, everything on defaults, no workaround. Before, on 6.18.52 without the patch, it stalled every 7-20 minutes.
Since 6.18.y stable is affected (that's where the PHY EEE fix was backported), it would be great to see this there too.
Thanks for the fix!
Dennis
Am Donnerstag, 1. Oktober 2026 um 02:30:16 MESZ hat <[email protected]> Folgendes geschrieben:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 11 lines · On Fri, 25 Sep 2026 09:10:40 +0200 you wrote:
Force EEE off on the RTL8168h/8111h (
RTL_GIGA_MAC_VER_46) at PHY connect withphy_disable_eee().Commit
202fef9bbbf5("net: phy: realtek: fix EEE advertisement write on the internal PHY MMD path") made EEE actually advertise on the generic Realtek PHY; the write had been a no-op before. On the RTL8168h that un-masks a latent defect: once EEE negotiates, RX silently stalls after ~7-20 minutes. The carrier stays up, no counter or dmesg moves, and only "ip link set down/up" recovers it; disabling EEE keeps the link stable.[...]
Here is the summary with links:
- [net,v1,1/1] r8169: disable EEE on RTL8168h/8111h
https://git.kernel.org/netdev/net/c/3cdeaef1754a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Heiner Kallweit
maintainerQuoted 5 lines · Dennis Piecha
Hi Oleksij,
I tested this on the affected machine with a Home Assistant OS test build that includes the patch (kernel 6.18.54-haos).
Quoted 8 lines
Hardware: Intel NUC11ATKPE, RTL8168h/8111h (XID 541), FRITZ!Box 6690 as link partner, no VLANs.
With the patch the NIC reports EEE as not supported and the RX stall is gone: more than 4 hours without a single drop, everything on defaults, no workaround. Before, on 6.18.52 without the patch, it stalled every 7-20 minutes.
I'm pretty sure that EEE was active for this chip version in earlier times. Are you sure it's not an issue on the link partner side? Did you test with a switch between your system and the FRITZ!Box?
Quoted 42 lines
Since 6.18.y stable is affected (that's where the PHY EEE fix was backported), it would be great to see this there too.
Tested-by Dennis Piecha <[email protected]>Thanks for the fix!
DennisAm Donnerstag, 1. Oktober 2026 um 02:30:16 MESZ hat <[email protected]> Folgendes geschrieben:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:Quoted 11 lines · On Fri, 25 Sep 2026 09:10:40 +0200 you wrote:
Force EEE off on the RTL8168h/8111h (
RTL_GIGA_MAC_VER_46) at PHY connect withphy_disable_eee().Commit
202fef9bbbf5("net: phy: realtek: fix EEE advertisement write on the internal PHY MMD path") made EEE actually advertise on the generic Realtek PHY; the write had been a no-op before. On the RTL8168h that un-masks a latent defect: once EEE negotiates, RX silently stalls after ~7-20 minutes. The carrier stays up, no counter or dmesg moves, and only "ip link set down/up" recovers it; disabling EEE keeps the link stable.[...]
Here is the summary with links:
- [net,v1,1/1] r8169: disable EEE on RTL8168h/8111h
https://git.kernel.org/netdev/net/c/3cdeaef1754aYou are awesome, thank you!
Sasha Levin
maintainerQuoted 7 lines · Heiner Kallweit
Quoted 2 lines · Dennis Piecha
defaults, no workaround. Before, on 6.18.52 without the patch, it stalled every 7-20 minutes.
I'm pretty sure that EEE was active for this chip version in earlier times. Are you sure it's not an issue on the link partner side? Did you test with a switch between your system and the FRITZ!Box?
Stable takes this for 6.18 and 7.2 because 202fef9bbbf5 ("net: phy: realtek:
fix EEE advertisement write on the internal PHY MMD path") reached 7.2 and 6.18.46+, and Dennis saw the stall on 6.18.52. EEE was not effectively advertised on these chips in those trees before that change (the advertisement write was a no-op), so your recollection holds for older kernels but not for these trees.
It only affects RTL_GIGA_MAC_VER_46, so the downside if the link partner is at fault is lost EEE power saving. We will follow any revert or rework upstream.
Signature · 2 lines
Thanks, Sasha