From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
David Miller <davem@davemloft.net>,
Realtek linux nic maintainers <nic_swsd@realtek.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net 0/2] net: phy: fix WoL handling when suspending the PHY
Date: Mon, 24 Sep 2018 20:08:23 +0200 [thread overview]
Message-ID: <a32b98eb-3071-2269-ab95-a44f90866912@gmail.com> (raw)
phy_suspend doesn't always recognize that WoL is enabled and therefore
suspends the PHY when it should not. First idea to address the issue
was to reuse checks used in mdio_bus_phy_may_suspend which check
whether relevant devices are wakeup-enabled.
Florian raised some concerns because drivers may enable wakeup even if
WoL isn't enabled (e.g. certain USB network drivers).
The new approach focuses on reducing the risk to break existing stuff.
We add a flag wol_enabled to struct net_device which is set in
ethtool_set_wol(). Then this flag is checked in phy_suspend().
This doesn't cover 100% of the cases yet (e.g. if WoL is enabled w/o
explicit configuration), but it covers the most relevant cases with
very little risk of regressions.
Heiner Kallweit (2):
net: core: add member wol_enabled to struct net_device
net: phy: fix WoL handling when suspending the PHY
drivers/net/phy/phy_device.c | 12 +++++++++---
include/linux/netdevice.h | 3 +++
net/core/ethtool.c | 9 ++++++++-
3 files changed, 20 insertions(+), 4 deletions(-)
--
2.19.0
next reply other threads:[~2018-09-25 0:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-24 18:08 Heiner Kallweit [this message]
2018-09-24 18:09 ` [PATCH net 1/2] net: core: add member wol_enabled to struct net_device Heiner Kallweit
2018-09-25 8:25 ` Michal Kubecek
2018-09-24 18:11 ` [PATCH net 2/2] net: phy: fix WoL handling when suspending the PHY Heiner Kallweit
2018-09-24 18:21 ` Florian Fainelli
2018-09-24 19:56 ` Heiner Kallweit
2018-09-24 21:39 ` Florian Fainelli
2018-09-24 20:01 ` [PATCH net v2 " 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=a32b98eb-3071-2269-ab95-a44f90866912@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@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).