[openwrt/openwrt] kernel: r8169: backport upstream fix

LEDE Commits lede-commits at lists.infradead.org
Sun Jan 4 07:42:49 PST 2026


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6ac5e28902454f79c8137ea5a450ee1e0bca4b3a

commit 6ac5e28902454f79c8137ea5a450ee1e0bca4b3a
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu Jan 1 17:28:56 2026 +0100

    kernel: r8169: backport upstream fix
    
    This fixes a bug introduced in a patch we backported.
    
    This patch was cherry picked from upstream Linux because it references a
    patch we backported in the fixes tag.
    
    Fixes: 91ce7f606a62 ("generic: backport upstream v6.16 r8169 patches")
    Link: https://github.com/openwrt/openwrt/pull/21366
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...8169-fix-RTL8127-hang-on-suspend-shutdown.patch | 50 ++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/target/linux/generic/backport-6.12/785-v6.18-r8169-fix-RTL8127-hang-on-suspend-shutdown.patch b/target/linux/generic/backport-6.12/785-v6.18-r8169-fix-RTL8127-hang-on-suspend-shutdown.patch
new file mode 100644
index 0000000000..269fc89d26
--- /dev/null
+++ b/target/linux/generic/backport-6.12/785-v6.18-r8169-fix-RTL8127-hang-on-suspend-shutdown.patch
@@ -0,0 +1,50 @@
+From ae1737e7339b513f8c2fc21b500a0fc215d155c3 Mon Sep 17 00:00:00 2001
+From: Heiner Kallweit <hkallweit1 at gmail.com>
+Date: Sat, 22 Nov 2025 15:23:02 +0100
+Subject: r8169: fix RTL8127 hang on suspend/shutdown
+
+There have been reports that RTL8127 hangs on suspend and shutdown,
+partially disappearing from lspci until power-cycling.
+According to Realtek disabling PLL's when switching to D3 should be
+avoided on that chip version. Fix this by aligning disabling PLL's
+with the vendor drivers, what in addition results in PLL's not being
+disabled when switching to D3hot on other chip versions.
+
+Fixes: f24f7b2f3af9 ("r8169: add support for RTL8127A")
+Tested-by: Fabio Baltieri <fabio.baltieri at gmail.com>
+Cc: stable at vger.kernel.org
+Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
+Link: https://patch.msgid.link/d7faae7e-66bc-404a-a432-3a496600575f@gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/ethernet/realtek/r8169_main.c | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/realtek/r8169_main.c
++++ b/drivers/net/ethernet/realtek/r8169_main.c
+@@ -1516,11 +1516,20 @@ static enum rtl_dash_type rtl_get_dash_t
+ 
+ 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)




More information about the lede-commits mailing list