From: Heiner Kallweit <hkallweit1@gmail.com>
To: Marc Haber <mh+netdev@zugschlus.de>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: WoL broken in r8169.c since kernel 4.19
Date: Fri, 25 Jan 2019 19:22:36 +0100 [thread overview]
Message-ID: <548c1682-ad7c-3a0a-b2ea-2207f328b070@gmail.com> (raw)
In-Reply-To: <20190125120210.GC27062@torres.zugschlus.de>
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
next prev parent reply other threads:[~2019-01-25 18:22 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-12 20:08 WoL broken in r8169.c since kernel 4.19 Marc Haber
2019-01-12 20:28 ` Heiner Kallweit
2019-01-12 20:44 ` Heiner Kallweit
2019-01-13 16:01 ` Marc Haber
2019-01-13 16:19 ` Heiner Kallweit
2019-01-22 16:10 ` Marc Haber
2019-01-22 18:47 ` Heiner Kallweit
2019-01-25 5:59 ` Marc Haber
2019-01-25 6:49 ` Heiner Kallweit
2019-01-25 12:02 ` Marc Haber
2019-01-25 18:22 ` Heiner Kallweit [this message]
2019-01-26 13:56 ` Marc Haber
2019-01-26 14:04 ` Heiner Kallweit
2019-01-26 17:07 ` Marc Haber
2019-01-26 19:22 ` Heiner Kallweit
2019-01-27 20:55 ` Marc Haber
2019-01-27 21:09 ` Heiner Kallweit
2019-01-28 7:30 ` Marc Haber
2019-01-28 19:02 ` Heiner Kallweit
2019-01-28 20:59 ` Marc Haber
2019-01-28 21:21 ` Heiner Kallweit
2019-01-29 11:52 ` Marc Haber
2019-01-28 20:22 ` Marc Haber
2019-01-28 20:28 ` Heiner Kallweit
2019-01-29 7:32 ` Marc Haber
2019-01-29 15:35 ` Marc Haber
2019-01-29 19:01 ` Heiner Kallweit
2019-01-30 8:46 ` Marc Haber
2019-01-29 21:20 ` Heiner Kallweit
2019-01-30 15:37 ` Marc Haber
2019-02-01 6:49 ` Heiner Kallweit
2019-02-01 17:19 ` Marc Haber
2019-02-01 18:24 ` Heiner Kallweit
2019-02-01 18:41 ` Marc Haber
2019-01-26 14:08 ` Heiner Kallweit
2019-01-26 14:09 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=548c1682-ad7c-3a0a-b2ea-2207f328b070@gmail.com \
--to=hkallweit1@gmail.com \
--cc=mh+netdev@zugschlus.de \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).