Browse Source

ethtool: time to blink provided in seconds not jiffies

When blinking for a duration set by the user, the value specified is in
seconds but it is used as the number of jiffies in the timeout after which
the Physical ID indicator is deactivated.  Fix by converting the timeout
to seconds.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Allan, Bruce W 14 years ago
parent
commit
143780c656
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/core/ethtool.c

+ 1 - 1
net/core/ethtool.c

@@ -1653,7 +1653,7 @@ static int ethtool_phys_id(struct net_device *dev, void __user *useraddr)
 	if (rc == 0) {
 	if (rc == 0) {
 		/* Driver will handle this itself */
 		/* Driver will handle this itself */
 		schedule_timeout_interruptible(
 		schedule_timeout_interruptible(
-			id.data ? id.data : MAX_SCHEDULE_TIMEOUT);
+			id.data ? (id.data * HZ) : MAX_SCHEDULE_TIMEOUT);
 	} else {
 	} else {
 		/* Driver expects to be called periodically */
 		/* Driver expects to be called periodically */
 		do {
 		do {