Skip to contentSkip to conversation

r8169: fix resume on cable plug-in

PATCH In review Heiner Kallweit 2 participants 2 messages Dec 1, 2019

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: fix resume on cable plug-in

It was reported [0] that network doesn't wake up on cable plug-in with certain chip versions. Reason is that on these chip versions the PHY doesn't detect cable plug-in when being in power-down mode. So prevent the PHY from powering down if WoL is enabled.

[0] https://bugzilla.kernel.org/show_bug.cgi?id=202103

Fixes 95fb8bb3181b ("net: phy: force phy suspend when calling phy_stop")
---
 drivers/net/ethernet/realtek/r8169_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/realtek/r8169_main.c +1 -0
index d47a038cb..0b47db2ff 100644
@@ -1542,6 +1542,7 @@ static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts)
 	rtl_lock_config_regs(tp);
 
 	device_set_wakeup_enable(tp_to_dev(tp), wolopts);
+	tp->dev->wol_enabled = wolopts ? 1 : 0;
 }
 
 static int rtl8169_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
Signature · 1 line
2.24.0
maintainer
#1 lore raw

From: Heiner Kallweit <[email protected]>
Date: Sun, 1 Dec 2019 10:39:56 +0100

Quoted 11 lines

It was reported [0] that network doesn't wake up on cable plug-in with certain chip versions. Reason is that on these chip versions the PHY doesn't detect cable plug-in when being in power-down mode. So prevent the PHY from powering down if WoL is enabled.

[0] https://bugzilla.kernel.org/show_bug.cgi?id=202103

Fixes 95fb8bb3181b ("net: phy: force phy suspend when calling phy_stop")

Applied and queued up for -stable.