* [PATCH net-2.6] sfc: Fix polling for slow MCDI operations
@ 2010-01-13 14:34 Ben Hutchings
2010-01-14 1:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2010-01-13 14:34 UTC (permalink / raw)
To: David Miller; +Cc: netdev, linux-net-drivers
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>
---
drivers/net/sfc/mcdi.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
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();
--
1.5.5
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-2.6] sfc: Fix polling for slow MCDI operations
2010-01-13 14:34 [PATCH net-2.6] sfc: Fix polling for slow MCDI operations Ben Hutchings
@ 2010-01-14 1:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-01-14 1:15 UTC (permalink / raw)
To: bhutchings; +Cc: netdev, linux-net-drivers
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Wed, 13 Jan 2010 14:34:25 +0000
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-14 1:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-13 14:34 [PATCH net-2.6] sfc: Fix polling for slow MCDI operations Ben Hutchings
2010-01-14 1:15 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.