Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

r8169: fix RTL8117 Wake-on-Lan in DASH mode

Wake-on-Lan does currently not work for r8169 in DASH mode, e.g. the
ASUS Pro WS X570-ACE with RTL8168fp/RTL8117.

Fix by not returning early in rtl_prepare_power_down when dash_enabled.
While this fixes WoL, it still kills the OOB RTL8117 remote management
BMC connection. Fix by not calling rtl8168_driver_stop if WoL is enabled.

Fixes: 065c27c184d6 ("r8169: phy power ops")
Signed-off-by: René Rebe <rene@exactco.de>
Cc: stable@vger.kernel.org
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/20251202.194137.1647877804487085954.rene@exactco.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

René Rebe and committed by
Jakub Kicinski
dd75c723 e7a9530d

+1 -4
+1 -4
drivers/net/ethernet/realtek/r8169_main.c
··· 2655 2655 2656 2656 static void rtl_prepare_power_down(struct rtl8169_private *tp) 2657 2657 { 2658 - if (tp->dash_enabled) 2659 - return; 2660 - 2661 2658 if (tp->mac_version == RTL_GIGA_MAC_VER_32 || 2662 2659 tp->mac_version == RTL_GIGA_MAC_VER_33) 2663 2660 rtl_ephy_write(tp, 0x19, 0xff64); ··· 4809 4812 rtl_disable_exit_l1(tp); 4810 4813 rtl_prepare_power_down(tp); 4811 4814 4812 - if (tp->dash_type != RTL_DASH_NONE) 4815 + if (tp->dash_type != RTL_DASH_NONE && !tp->saved_wolopts) 4813 4816 rtl8168_driver_stop(tp); 4814 4817 } 4815 4818