From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.84.56 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796554332; b=JpdKXFEMu35l77C1kPw4hYZcbEHg5X1FHkc5jMeKrLmWvbAniod6+GHdu3sNAUHYCcPK Vhc+e+9dizIfhFwBRVQR01eGEZxOz6/Utf42DI2rQrccmOQX2xAN56CV2LEYZmL5Wa1MG Ow0C/ZOX90vf+nuc+3pWvE1vI+dPOQAscgYV4FRIBTffPqM77ULznTAHrmXQWq+EJYpFT mKJq6sEj7z4tGUCQl4WGIf160V5lUvSdn8GK5x4kc40mgAUR6ZnGyAxWKUd2szWfDMQQS IBT9YXjA/+w8E7zdobMkbD5DaZlHFOIztC2Wj9cGNFX4hrEUpZ44FC6WwepNhb+OfdA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796554332; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=47bd7hwbM7Pb2Dv5D8DH7/DBG+HbZhKhbXst9eJt7Vo=; b=TsMtFV59iRIERWR4+cTy28F8v5OkGAwbKzq1sW9J6iz2YPDGYPccbIjZBEvdQTQmbtdD rXW5pltLKL0Mh43GOc3SaduPEQEX8+QYy+8bjPbIQ2DjTB+UhqnwyWD9V7UJBCKcM+FrQ PbHYO++BLqS+wL1BX1UCufQExImJHJMZ2NNYZ6paA5mwiuSqf+mA3nsHOT/Shsnxpxo+P 4xXdwlJcVLX124A69gBZEMXR0lIiXNb4V8OlZkoIr6NU8b9VT85cIAMJ/+vuN9t+cxMx7 bBxu2u6fuJ2AXGQygICKYc7zbESqCaEezKLzGcPAgGldAjTNBkmd+repk05t4RXh+jw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=PLD5ZJa1; arc=none smtp.remote-ip=185.246.84.56 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25294606A31F for ; Sun, 6 Dec 2026 10:52:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 25294606A31F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=PLD5ZJa1 Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 275C01A19A3; Sun, 6 Dec 2026 10:52:09 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id D5AF8604C0; Sun, 6 Dec 2026 10:52:08 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C21C911EA1870; Sun, 06 Dec 2026 11:52:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796554327; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=47bd7hwbM7Pb2Dv5D8DH7/DBG+HbZhKhbXst9eJt7Vo=; b=PLD5ZJa10Em3ZYZwaLd6Als9BMrdMlKHa6Cljgt9SzHF7bqKhE4YffHGTqWdGGLd2GgD2r y+zaYLSlZpDNMlR3BrFMqppRQ0pzjpRVc7OVZ0Eb1kMtTOHN0nNEaJBut0GBn/YWHTvqXh jXMFwlb57TdeE3uLf6iiSeUrdRaUYXNi2UfxHwJiweOtI7Wte1nTTUqKTyImIx+dmtaQD4 HL2uVQPoG7MIGVSaMy+0nTQGF37/uqIS1LX/Kux5R91rBB7VpGMKM0uNBUxLqkL+Flyzwq oM/HkUAjJY2kePh19qe+21l82qAoXTMzptHKICwIlXHdk3xfcF6zI+oZf5RcNw== Message-ID: <2067aeab-87bc-440f-bed0-d3e20087c129@bootlin.com> Date: Sun, 6 Dec 2026 11:51:59 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net v1 1/1] r8169: disable EEE on RTL8168h/8111h To: Oleksij Rempel Cc: Andrew Lunn , nic_swsd@realtek.com, Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Dennis Piecha , stable@vger.kernel.org, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org References: <20260925071040.2137178-1-o.rempel@pengutronix.de> <33b49886-7cfb-47af-9e71-3014ba1b39cc@bootlin.com> Content-Language: en-US From: Maxime Chevallier In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 Hey, On 12/6/26 11:27, Oleksij Rempel wrote: > Hi Maxime, > > On Sun, Dec 06, 2026 at 08:09:02AM +0100, Maxime Chevallier wrote: >> 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. > > Thx for diving into it! > >> 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 would recommend to use some device having a LPI counter, which report > amount of transactions to the Low Power Idle mode (and/or reporting time > spent in the LPI). For example LAN7850 support it. It does enter LPI, running with devices that have counters show that we're basically entering LPI after every frame > Otherwise, you will need to attach oscilloscope and measure signal on > the MDI side. Active EEE will be visible without any advanced equipment. > > See: > https://youtu.be/jfm0GoPu3jM?si=wHtlgta6Qt2zeJM3&t=1185 > >> 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. > > The combination of tx-timer configurations and link-speed should be correct. > In the 1000Mbit mode, the link will be switched to the LPI , only if > both timers on both link sides are agree. Means, if peer A has short > tx-timer and other side has long or infinite timer, then LPI well be > never activated. Active EEE do not mean active LPI. Yeah in my case I have 12µs on the realtek side, and 0 on the other end > > In 100Mbit mode, we will get separate LPI behavior on each pair. And > may be higher chance to trigger something. Ah, haven't tried at 100M, maybe it will show a different behaviour ! > >> Any chance the original problem was on the link-partner side maybe ? > > It can be very high chance. > > Other questions is, if the system has external or internal PHY. If > external, do it has active SmartEEE? good question, I haven't considered these phy-side EEE with SmartEEE or grEEEn stuff. > >> What was the partner's HW (PHY + MAC) in that case, and what kind of traffic >> did you use to trigger that ? > > I guess, any traffic with measurable LPI effects. If you can measure > MAC+PHY power consumption (or at leas system wide power) it will be > great. > > Except of this, I can imagine that cable length and/or injected noise > can trigger some of issues. > >> 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... > > Probably you will need to monitor link drop counts and any kind of > packet drops (corruptions too). I'll test with even more peers, speeds, LPI timer configs and see if I can see anything then, thanks a lot for the tips, Maxime > > Best Regards, > Oleksij