From: Andrew Lunn <andrew@lunn.ch>
To: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v3 net-next 6/8] lan743x: Add power management support
Date: Wed, 18 Jul 2018 23:35:13 +0200 [thread overview]
Message-ID: <20180718213513.GA23800@lunn.ch> (raw)
In-Reply-To: <1531947878-9758-7-git-send-email-Bryan.Whitehead@microchip.com>
> +#ifdef CONFIG_PM
> +static void lan743x_ethtool_get_wol(struct net_device *netdev,
> + struct ethtool_wolinfo *wol)
> +{
> + struct lan743x_adapter *adapter = netdev_priv(netdev);
> +
> + wol->supported = 0;
> + wol->wolopts = 0;
> + phy_ethtool_get_wol(netdev->phydev, wol);
> +
> + wol->supported &= WAKE_BCAST | WAKE_UCAST | WAKE_MCAST |
> + WAKE_MAGIC | WAKE_PHY | WAKE_ARP;
Hi Bryan
Say the PHY set WAKE_MAGICSECURE, because it supports that. This AND
then wipes it out, making the call to phy_ethtool_get_wol() pointless.
In fact, should this AND be an OR?
> +
> +#ifdef CONFIG_PM
> +static int lan743x_ethtool_set_wol(struct net_device *netdev,
> + struct ethtool_wolinfo *wol)
> +{
> + struct lan743x_adapter *adapter = netdev_priv(netdev);
> +
> + if (wol->wolopts & WAKE_MAGICSECURE)
> + return -EOPNOTSUPP;
The PHY might support this. Since you call phy_ethtool_set_wol(), you
should give it the chance.
Andrew
next prev parent reply other threads:[~2018-07-18 22:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-18 21:04 [PATCH v3 net-next 0/8] lan743x: Add features to lan743x driver Bryan Whitehead
2018-07-18 21:04 ` [PATCH v3 net-next 1/8] lan743x: Add support for ethtool get_drvinfo Bryan Whitehead
2018-07-18 21:04 ` [PATCH v3 net-next 2/8] lan743x: Add support for ethtool link settings Bryan Whitehead
2018-07-18 21:04 ` [PATCH v3 net-next 3/8] lan743x: Add support for ethtool statistics Bryan Whitehead
2018-07-18 21:04 ` [PATCH v3 net-next 4/8] lan743x: Add support for ethtool message level Bryan Whitehead
2018-07-18 21:04 ` [PATCH v3 net-next 5/8] lan743x: Add support for ethtool eeprom access Bryan Whitehead
2018-07-18 21:04 ` [PATCH v3 net-next 6/8] lan743x: Add power management support Bryan Whitehead
2018-07-18 21:35 ` Andrew Lunn [this message]
2018-07-18 21:55 ` Bryan.Whitehead
2018-07-18 22:43 ` Andrew Lunn
2018-07-18 22:46 ` Bryan.Whitehead
2018-07-18 22:15 ` David Miller
2018-07-18 22:17 ` David Miller
2018-07-18 22:36 ` Bryan.Whitehead
2018-07-18 21:04 ` [PATCH v3 net-next 7/8] lan743x: Add EEE support Bryan Whitehead
2018-07-18 21:46 ` Andrew Lunn
2018-07-18 21:04 ` [PATCH v3 net-next 8/8] lan743x: Add RSS support Bryan Whitehead
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=20180718213513.GA23800@lunn.ch \
--to=andrew@lunn.ch \
--cc=Bryan.Whitehead@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=davem@davemloft.net \
--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).