Skip to content

Commit

Permalink
sfc: Fix polling for slow MCDI operations
Browse files Browse the repository at this point in the history
When the interface is down and we are using polled mode for MCDI
operations, we busy-wait for completion for approximately 1 jiffy
using udelay() and then back off to schedule().  But the completion
will not wake the task, since we are using polled mode!  We must use
schedule_timeout_uninterruptible() instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Jan 14, 2010
1 parent baf86c9 commit 55029c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/sfc/mcdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ static int efx_mcdi_poll(struct efx_nic *efx)
if (spins != 0) {
--spins;
udelay(1);
} else
schedule();
} else {
schedule_timeout_uninterruptible(1);
}

time = get_seconds();

Expand Down

0 comments on commit 55029c1

Please sign in to comment.