[ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed

Subsystems: the rest

2 messages, 2 authors, 2012-10-05 · open the first message on its own page

[ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed

From: Jeff Kirsher <hidden>
Date: 2012-09-19 03:20:23

From: Bruce Allan <redacted>

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 <redacted>
Tested-by: Aaron Brown <redacted>
Signed-off-by: Jeff Kirsher <redacted>
---
 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

Re: [ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed

From: Ben Hutchings <hidden>
Date: 2012-10-05 23:14:31

On Tue, 2012-09-18 at 20:20 -0700, Jeff Kirsher wrote:
From: Bruce Allan <redacted>

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help