Commit 65f667fb authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

sfc: Correct interpretation of second param to ethtool phys_id()

A value of 0 means indefinite repetition (until interrupted).
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2b2734dc
...@@ -182,12 +182,16 @@ static struct efx_ethtool_stat efx_ethtool_stats[] = { ...@@ -182,12 +182,16 @@ static struct efx_ethtool_stat efx_ethtool_stats[] = {
*/ */
/* Identify device by flashing LEDs */ /* 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); struct efx_nic *efx = netdev_priv(net_dev);
efx->board_info.blink(efx, 1); 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); efx->board_info.blink(efx, 0);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment