lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <22b15123-b134-467c-835c-c9e0f1e19e29@gmail.com>
Date: Fri, 21 Nov 2025 00:17:33 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Fabio Baltieri <fabio.baltieri@...il.com>,
 Michael Zimmermann <sigmaepsilon92@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>, nic_swsd@...ltek.com,
 Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
 <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] r8169: add support for RTL8127ATF

On 11/19/2025 11:26 AM, Fabio Baltieri wrote:
> On Wed, Nov 19, 2025 at 08:00:01AM +0100, Michael Zimmermann wrote:
>> I've also done some testing with the out-of-tree driver:
>> - (my normal setup) a DAC between the rt8127 and a 10G switch works just fine.
>> - RJ45 10G modules on both sides works fine, but HwFiberModeVer stays
>> at 1 even after reloading the driver.
>> - RJ45 1G modules on both sides works after "ethtool -s enp1s0 speed
>> 1000 duplex full autoneg on", but you have to do that while connected
>> via 10G because that driver is buggy and returns EINVAL otherwise.
>> HwFiberModeVer was 1 as well after reloading the driver.
> 
> You are right, did some more extensive testing and it seems like
> switching speed is somewhat unreliable.
> 
> I've also bumped into
> https://lore.kernel.org/netdev/cc1c8d30-fda0-4d3d-ad61-3ff932ef0222@gmail.com/
> and sure enough this is affected too, it also does not survive suspend
> without the wol flag, but more importantly I've found that the serdes
> has to be reconfigured on resume, so I need to send a v2 moving some
> code around.
> 
Could you please test whether the following fixes the chip hang on suspend / shutdown?

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index de304d1eb..97dbe8f89 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -1517,11 +1517,20 @@ static enum rtl_dash_type rtl_get_dash_type(struct rtl8169_private *tp)
 
 static void rtl_set_d3_pll_down(struct rtl8169_private *tp, bool enable)
 {
-	if (tp->mac_version >= RTL_GIGA_MAC_VER_25 &&
-	    tp->mac_version != RTL_GIGA_MAC_VER_28 &&
-	    tp->mac_version != RTL_GIGA_MAC_VER_31 &&
-	    tp->mac_version != RTL_GIGA_MAC_VER_38)
-		r8169_mod_reg8_cond(tp, PMCH, D3_NO_PLL_DOWN, !enable);
+	switch (tp->mac_version) {
+	case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_24:
+	case RTL_GIGA_MAC_VER_28:
+	case RTL_GIGA_MAC_VER_31:
+	case RTL_GIGA_MAC_VER_38:
+		break;
+	case RTL_GIGA_MAC_VER_80:
+		r8169_mod_reg8_cond(tp, PMCH, D3_NO_PLL_DOWN, true);
+		break;
+	default:
+		r8169_mod_reg8_cond(tp, PMCH, D3HOT_NO_PLL_DOWN, true);
+		r8169_mod_reg8_cond(tp, PMCH, D3COLD_NO_PLL_DOWN, !enable);
+		break;
+	}
 }
 
 static void rtl_reset_packet_filter(struct rtl8169_private *tp)
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ