[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <548c1682-ad7c-3a0a-b2ea-2207f328b070@gmail.com>
Date: Fri, 25 Jan 2019 19:22:36 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Marc Haber <mh+netdev@...schlus.de>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: WoL broken in r8169.c since kernel 4.19
On 25.01.2019 13:02, Marc Haber wrote:
> On Fri, Jan 25, 2019 at 07:49:56AM +0100, Heiner Kallweit wrote:
>> thanks a lot for the detailed analysis. That this ethtool sequence
>>
>> ethtool -s <if> wol d
>> ethtool -s <if> wol g
>>
>> helps makes me think that the following patch should help too.
>> Could you please test?
>
> That patch didn't apply cleanly because the rtl_init_one in kernel
> 4.20.4 is missing the INIT_WORK call at this place.
>
> And it doesn't change the behavior, the two ethtool calls are needed so
> that the host wakes up from suspend to ram on a magic packet.
>
Then I'm slowly running out of ideas. New in 4.19 is a check for invalid
WoL flags, but usually the caller should warn if -EINVAL is returned.
Nevertheless, could you try the following and check whether the warning
is triggered?
---
drivers/net/ethernet/realtek/r8169.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 04c403539..a27cfc6e7 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -1491,8 +1491,10 @@ static int rtl8169_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
struct rtl8169_private *tp = netdev_priv(dev);
struct device *d = tp_to_dev(tp);
- if (wol->wolopts & ~WAKE_ANY)
+ if (wol->wolopts & ~WAKE_ANY) {
+ pr_warn("invalid WoL value: 0x%08x\n", wol->wolopts);
return -EINVAL;
+ }
pm_runtime_get_noresume(d);
--
2.20.1
> Greetings
> Marc
>
Heiner
Powered by blists - more mailing lists