]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sfc: Correct interpretation of second param to ethtool phys_id()
authorBen Hutchings <bhutchings@solarflare.com>
Sat, 13 Dec 2008 05:32:10 +0000 (21:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Dec 2008 05:56:20 +0000 (21:56 -0800)
A value of 0 means indefinite repetition (until interrupted).

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sfc/ethtool.c

index cd92c4d8dbc56381c7243e4694fbcc61e736edf3..9c533e036a0047b38a1b626ec558ee2025cf5b97 100644 (file)
@@ -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;
 }