diff mbox

[05/33] sfc: Correct interpretation of second param to ethtool phys_id()

Message ID 20081212124950.GE10372@solarflare.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ben Hutchings Dec. 12, 2008, 12:49 p.m. UTC
A value of 0 means indefinite repetition (until interrupted).

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
 drivers/net/sfc/ethtool.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

Comments

David Miller Dec. 13, 2008, 5:32 a.m. UTC | #1
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Fri, 12 Dec 2008 12:49:50 +0000

> A value of 0 means indefinite repetition (until interrupted).
> 
> Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index cd92c4d..9c533e0 100644
--- a/drivers/net/sfc/ethtool.c
+++ b/drivers/net/sfc/ethtool.c
@@ -182,12 +182,16 @@  static struct efx_ethtool_stat efx_ethtool_stats[] = {
  */
 
 /* Identify device by flashing LEDs */
-static int efx_ethtool_phys_id(struct net_device *net_dev, u32 seconds)
+static int efx_ethtool_phys_id(struct net_device *net_dev, u32 count)
 {
 	struct efx_nic *efx = netdev_priv(net_dev);
 
 	efx->board_info.blink(efx, 1);
-	schedule_timeout_interruptible(seconds * HZ);
+	set_current_state(TASK_INTERRUPTIBLE);
+	if (count)
+		schedule_timeout(count * HZ);
+	else
+		schedule();
 	efx->board_info.blink(efx, 0);
 	return 0;
 }