netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: bhutchings@solarflare.com
Cc: Bruce Allan <bruce.w.allan@intel.com>,
	netdev@vger.kernel.org, gospo@redhat.com, sassmann@redhat.com,
	Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed
Date: Tue, 18 Sep 2012 20:20:19 -0700	[thread overview]
Message-ID: <1348024819-29876-1-git-send-email-jeffrey.t.kirsher@intel.com> (raw)

From: Bruce Allan <bruce.w.allan@intel.com>

When setting EEE parameters with the --set-eee command line option,
ethtool will send the ETHTOOL_SEEE ioctl down to the driver even if
none of the provided parameters are a change from current settings.
Simply ignore it when that happens as done with other ethtool commands.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ethtool.c b/ethtool.c
index 25ba51f..f3649e2 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -3645,7 +3645,7 @@ static int do_geee(struct cmd_context *ctx)
 static int do_seee(struct cmd_context *ctx)
 {
 	int adv_c = -1, lpi_c = -1, lpi_time_c = -1, eee_c = -1;
-	int change = -1, change2 = -1;
+	int change = -1, change2 = 0;
 	struct ethtool_eee eeecmd;
 	struct cmdline_info cmdline_eee[] = {
 		{ "advertise",    CMDL_U32,  &adv_c,       &eeecmd.advertised },
-- 
1.7.11.4

             reply	other threads:[~2012-09-19  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-19  3:20 Jeff Kirsher [this message]
2012-10-05 23:14 ` [ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed Ben Hutchings

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=1348024819-29876-1-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=bhutchings@solarflare.com \
    --cc=bruce.w.allan@intel.com \
    --cc=gospo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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).