提交 143780c6 编写于 作者: A Allan, Bruce W 提交者: David S. Miller

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: NBruce Allan <bruce.w.allan@intel.com>
Acked-by: NBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6ba1037c
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册