summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-01-13 05:34:25 +0100
committerDavid S. Miller <davem@davemloft.net>2010-01-14 02:12:47 +0100
commit55029c1d65158aea9672c5dfadb43a57f23e3100 (patch)
tree2222cdb3a0c81256f89d5e26b299239e66497769 /drivers
parente1000e: workaround link issues on busy hub in half duplex on 82577/82578 (diff)
downloadlinux-55029c1d65158aea9672c5dfadb43a57f23e3100.tar.xz
linux-55029c1d65158aea9672c5dfadb43a57f23e3100.zip
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: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sfc/mcdi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c
index 683353b904c7..0d4eba7266ec 100644
--- a/drivers/net/sfc/mcdi.c
+++ b/drivers/net/sfc/mcdi.c
@@ -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();