[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190130153735.GN27062@torres.zugschlus.de>
Date: Wed, 30 Jan 2019 16:37:35 +0100
From: Marc Haber <mh+netdev@...schlus.de>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: WoL broken in r8169.c since kernel 4.19
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
--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Powered by blists - more mailing lists