summaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-12-13 06:32:10 +0100
committerDavid S. Miller <davem@davemloft.net>2008-12-13 06:56:20 +0100
commit65f667fb472d28c1594d862b213a564e292a466c (patch)
tree81fb4e97f90bab6901f363b602b1a50ebc026ca7 /drivers/net/sfc
parentsfc: Remove unneeded register write (diff)
downloadlinux-65f667fb472d28c1594d862b213a564e292a466c.tar.xz
linux-65f667fb472d28c1594d862b213a564e292a466c.zip
sfc: Correct interpretation of second param to ethtool phys_id()
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>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/ethtool.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c
index cd92c4d8dbc5..9c533e036a00 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;
}