Great, thanks. This patch has been applied and is part of latest linux-next kernel already: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/?h=next-20190201 Would be much appreciated if you could build and test this kernel version.
Heiner On 30.01.2019 16:37, Marc Haber wrote: > On Tue, Jan 29, 2019 at 10:20:48PM +0100, Heiner Kallweit wrote: >> one more attempt, could you please test the following with 4.19 or 4.20 >> (w/o the other debug patches) ? > > With the following patch, the machine wakes up fine on a WoL magic > packet: > > nux-4.20.5/drivers/net/ethernet/realtek/r8169.c 2019-01-30 > 16:03:00.090841076 +0100 > +++ orig/linux-4.20.5/drivers/net/ethernet/realtek/r8169.c 2019-01-26 > 09:20:52.000000000 +0100 > @@ -1418,7 +1418,6 @@ > > #define WAKE_ANY (WAKE_PHY | WAKE_MAGIC | WAKE_UCAST | WAKE_BCAST | > WAKE_MCAST) > > -#if 0 > static u32 __rtl8169_get_wol(struct rtl8169_private *tp) > { > u8 options; > @@ -1453,7 +1452,6 @@ > > return wolopts; > } > -#endif > > static void rtl8169_get_wol(struct net_device *dev, struct ethtool_wolinfo > *wol) > { > @@ -1463,8 +1461,6 @@ > wol->supported = WAKE_ANY; > wol->wolopts = tp->saved_wolopts; > rtl_unlock_work(tp); > - > - pr_info("get_wol: 0x%08x\n", wol->wolopts); > } > > static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts) > @@ -1540,8 +1536,6 @@ > struct rtl8169_private *tp = netdev_priv(dev); > struct device *d = tp_to_dev(tp); > > - pr_info("set_wol: 0x%08x\n", wol->wolopts); > - > if (wol->wolopts & ~WAKE_ANY) > return -EINVAL; > > @@ -4174,7 +4168,7 @@ > { > struct phy_device *phydev; > > - if (!device_may_wakeup(tp_to_dev(tp))) > + if (!__rtl8169_get_wol(tp)) > return false; > > /* phydev may not be attached to netdevice */ > @@ -7372,6 +7366,8 @@ > return rc; > } > > + tp->saved_wolopts = __rtl8169_get_wol(tp); > + > mutex_init(&tp->wk.mutex); > u64_stats_init(&tp->rx_stats.syncp); > u64_stats_init(&tp->tx_stats.syncp); > 1 [14/5006]mh@fan:~/linux/4.20.5 $ > > I'll send the dmesg output to you in private e-mail > > Greetings > Marc >