From: David Miller <davem@davemloft.net>
To: hkallweit1@gmail.com
Cc: nic_swsd@realtek.com, netdev@vger.kernel.org
Subject: Re: [PATCH v3 net-next] r8169: improve WoL handling
Date: Thu, 31 Jan 2019 12:53:21 -0800 (PST) [thread overview]
Message-ID: <20190131.125321.967538547103372593.davem@davemloft.net> (raw)
In-Reply-To: <4035d591-c898-d5f1-5fb3-703fbe1c709e@gmail.com>
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Thu, 31 Jan 2019 19:57:26 +0100
> WoL handling for the RTL8168 family is a little bit tricky because of
> different types of broken BIOS and/or chip quirks.
>
> Two known issues:
> 1. Network properly resumes from suspend only if WoL is enabled in the chip.
> 2. Some notebooks wake up immediately if system is suspended and network
> device is wakeup-enabled.
>
> Few patches tried to deal with this:
> 7edf6d314cd0 ("r8169: disable WOL per default")
> 18041b523692 ("r8169: restore previous behavior to accept BIOS WoL
> settings")
>
> Currently we have the situation that the chip WoL settings as set by
> the BIOS are respected (to prevent issue 1), but the device doesn't get
> wakeup-enabled (to prevent issue 2).
>
> This leads to another issue:
> If systemd is told to set WoL it first checks whether the requested
> settings are active already (and does nothing if yes). Due to the chip
> WoL flags being set properly systemd assumes that WoL is configured
> properly in our case. Result is that device doesn't get wakeup-enabled
> and WoL doesn't work (until it's set e.g. by ethtool).
>
> This patch now:
> - leaves the chip WoL settings as is (to prevent issue 1)
> - keeps the behavior to not wakeup-enable the device initially
> (to prevent issue 2)
> - In addition we report WoL as being disabled in get_wol, matching
> that device isn't wakeup-enabled. If systemd is told to enable WoL,
> it will therefore detect that it has to do something and will
> call set_wol.
>
> Of course the user still has the option to override this with
> e.g. ethtool.
>
> v2:
> - Don't just exclude __rtl8169_get_wol() from compiling, remove it.
> v3:
> - adjust commit message
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied, thanks.
prev parent reply other threads:[~2019-01-31 20:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-31 18:57 [PATCH v3 net-next] r8169: improve WoL handling Heiner Kallweit
2019-01-31 20:53 ` David Miller [this message]
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=20190131.125321.967538547103372593.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
/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).