netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed
@ 2012-09-19  3:20 Jeff Kirsher
  2012-10-05 23:14 ` Ben Hutchings
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2012-09-19  3:20 UTC (permalink / raw)
  To: bhutchings; +Cc: Bruce Allan, netdev, gospo, sassmann, Jeff Kirsher

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed
  2012-09-19  3:20 [ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed Jeff Kirsher
@ 2012-10-05 23:14 ` Ben Hutchings
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Hutchings @ 2012-10-05 23:14 UTC (permalink / raw)
  To: Jeff Kirsher; +Cc: Bruce Allan, netdev, gospo, sassmann

On Tue, 2012-09-18 at 20:20 -0700, Jeff Kirsher wrote:
> 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.
[...]

Applied, thanks.  Sorry for the slow response.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-05 23:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-19  3:20 [ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed Jeff Kirsher
2012-10-05 23:14 ` Ben Hutchings

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).