ethtool: time to blink provided in seconds not jiffies
Subsystems (2)
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
@@ -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 {
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
Signed-off-by Bruce Allan <[email protected]>
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.
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
Signed-off-by Bruce Allan <[email protected]>Acked-by Ben Hutchings <[email protected]>
Applied, thanks.