瀏覽代碼

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>
Ben Hutchings 15 年之前
父節點
當前提交
55029c1d65
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      drivers/net/sfc/mcdi.c

+ 3 - 2
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();