From: Bruce Allan <bruce.w.allan@intel.com>
To: netdev@vger.kernel.org
Subject: [net-next-2.6 PATCH] ethtool: time to blink provided in seconds not jiffies
Date: Mon, 11 Apr 2011 16:01:59 -0700 [thread overview]
Message-ID: <20110411230159.6727.91380.stgit@gitlad.jf.intel.com> (raw)
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 {
next reply other threads:[~2011-04-11 23:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-11 23:01 Bruce Allan [this message]
2011-04-11 23:57 ` [net-next-2.6 PATCH] ethtool: time to blink provided in seconds not jiffies Ben Hutchings
2011-04-12 20:47 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110411230159.6727.91380.stgit@gitlad.jf.intel.com \
--to=bruce.w.allan@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).