Commit 55029c1d authored by Ben Hutchings's avatar Ben Hutchings Committed by David S. Miller

sfc: Fix polling for slow MCDI operations

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: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent baf86c9d
...@@ -142,8 +142,9 @@ static int efx_mcdi_poll(struct efx_nic *efx) ...@@ -142,8 +142,9 @@ static int efx_mcdi_poll(struct efx_nic *efx)
if (spins != 0) { if (spins != 0) {
--spins; --spins;
udelay(1); udelay(1);
} else } else {
schedule(); schedule_timeout_uninterruptible(1);
}
time = get_seconds(); time = get_seconds();
......
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