* [net-next-2.6 PATCH] ethtool: time to blink provided in seconds not jiffies
@ 2011-04-11 23:01 Bruce Allan
2011-04-11 23:57 ` Ben Hutchings
0 siblings, 1 reply; 3+ messages in thread
From: Bruce Allan @ 2011-04-11 23:01 UTC (permalink / raw)
To: netdev
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>
---
net/core/ethtool.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 704e176..43ef09f 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -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 {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [net-next-2.6 PATCH] ethtool: time to blink provided in seconds not jiffies
2011-04-11 23:01 [net-next-2.6 PATCH] ethtool: time to blink provided in seconds not jiffies Bruce Allan
@ 2011-04-11 23:57 ` Ben Hutchings
2011-04-12 20:47 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Ben Hutchings @ 2011-04-11 23:57 UTC (permalink / raw)
To: Bruce Allan; +Cc: netdev
On Mon, 2011-04-11 at 16:01 -0700, Bruce Allan wrote:
> 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.
> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Ben.
--
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [net-next-2.6 PATCH] ethtool: time to blink provided in seconds not jiffies
2011-04-11 23:57 ` Ben Hutchings
@ 2011-04-12 20:47 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2011-04-12 20:47 UTC (permalink / raw)
To: bhutchings; +Cc: bruce.w.allan, netdev
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Tue, 12 Apr 2011 00:57:14 +0100
> On Mon, 2011-04-11 at 16:01 -0700, Bruce Allan wrote:
>> 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.
>
>> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
> Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-12 20:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-11 23:01 [net-next-2.6 PATCH] ethtool: time to blink provided in seconds not jiffies Bruce Allan
2011-04-11 23:57 ` Ben Hutchings
2011-04-12 20:47 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).