From: David Miller <davem@davemloft.net>
To: git@karolherbst.de
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] net/forcedeth: refactor wol support to make it easier to add more wol modes
Date: Sun, 13 Mar 2016 22:14:34 -0400 (EDT) [thread overview]
Message-ID: <20160313.221434.1980290565680430002.davem@davemloft.net> (raw)
In-Reply-To: <1457621884-2479-2-git-send-email-git@karolherbst.de>
From: Karol Herbst <git@karolherbst.de>
Date: Thu, 10 Mar 2016 15:58:03 +0100
> @@ -4218,8 +4219,9 @@ static void nv_get_wol(struct net_device *dev, struct ethtool_wolinfo *wolinfo)
> wolinfo->supported = WAKE_MAGIC;
>
> spin_lock_irq(&np->lock);
> - if (np->wolenabled)
> - wolinfo->wolopts = WAKE_MAGIC;
> + wolinfo->wolopts = 0;
> + if (np->wolenabled & WAKE_MAGIC)
> + wolinfo->wolopts |= WAKE_MAGIC;
> spin_unlock_irq(&np->lock);
> }
>
When I see a change like this I can see you don't understand the
contract that exists between the ethtool core layer and your
driver.
The command info struct, in this case 'wolinfo' passed to you is
zero'd out, always.
Therefore the part of the change explicitly clearing out
wolinfo->wolopts is completely unnecessary and needs to be removed.
Thanks.
next prev parent reply other threads:[~2016-03-14 2:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-10 14:58 [PATCH 0/2] drivers/net/forcedeth: add support for WAKE_PHY Karol Herbst
2016-03-10 14:58 ` [PATCH 1/2] net/forcedeth: refactor wol support to make it easier to add more wol modes Karol Herbst
2016-03-14 2:14 ` David Miller [this message]
2016-03-10 14:58 ` [PATCH 2/2] net/forcedeth: add wol p support Karol Herbst
2016-03-10 16:13 ` Karol Herbst
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=20160313.221434.1980290565680430002.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=git@karolherbst.de \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®