From: Ben Hutchings Date: Wed, 13 Jan 2010 04:34:25 +0000 (+0000) Subject: sfc: Fix polling for slow MCDI operations X-Git-Tag: upstream/snapshot3+hdmi~15639^2~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=55029c1d65158aea9672c5dfadb43a57f23e3100;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/sfc/mcdi.c b/drivers/net/sfc/mcdi.c index 683353b..0d4eba7 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();