mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
baf86c9d36
commit
55029c1d65
1 changed files with 3 additions and 2 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue