Re: [PATCH net v1 1/1] r8169: disable EEE on RTL8168h/8111h
From: Maxime Chevallier
Date: Sun Dec 06 2026 - 02:09:20 EST
Hi Oleskij, Dennis,
On 9/25/26 09:10, Oleksij Rempel wrote:
> 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.
I recently got a bunch of quad-ports RTL8168h/8111h cards with the same version
info that you report, and I'm using these to test EEE kselftests I'm planning
to upstream next week.
I tried to reproduce this issue with multiple peers :
- Intel i350 (igb driver)
- mvpp2 + marvell 88e1510 PHY
- mvneta + 88e6341 switch and its internal PHY
- mvneta + 88e6176 switch and its PHY
I tested multiple loads: just pings, high-throughput tests with iperf3, mix of
UDP + TCP + random delays, this has been running for multiple hours each with
this patch reverted, and I didn't reproduce any of these stalls.
Any chance the original problem was on the link-partner side maybe ?
What was the partner's HW (PHY + MAC) in that case, and what kind of traffic
did you use to trigger that ?
It's not very urgent on my side, I have enough i350 ports to run the stmmac CI and
the eee tests when they land, but TBH the realtek cards are cheaper, and if I could
use these in my setup to test EEE that'd be awesome :)
In the meantime, I'll keep running long tests with this patch reverted, see if I can
reproduce that...
Maxime