Skip to contentSkip to conversation

ethtool: time to blink provided in seconds not jiffies

PATCH Applied Bruce Allan 3 participants 3 messages Apr 11, 2011 – Apr 12, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

 net/core/ethtool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/core/ethtool.c +1 -1
index 704e176..43ef09f 100644
@@ -1653,7 +1653,7 @@ static int ethtool_phys_id(struct net_device *dev, void __user *useraddr)
 	if (rc == 0) {
 		/* Driver will handle this itself */
 		schedule_timeout_interruptible(
-			id.data ? id.data : MAX_SCHEDULE_TIMEOUT);
+			id.data ? (id.data * HZ) : MAX_SCHEDULE_TIMEOUT);
 	} else {
 		/* Driver expects to be called periodically */
 		do {
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Bruce Allan

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.

D'oh.

Quoted 1 line

Ben.

Signature · 3 lines
Ben Hutchings, Senior Software 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.
maintainer Applied
#2 lore raw

From: Ben Hutchings <[email protected]>
Date: Tue, 12 Apr 2011 00:57:14 +0100

Quoted 10 lines · Bruce Allan
Quoted 4 lines

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.

D'oh.

Quoted 1 line

Applied, thanks.