diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-03 00:43:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-03 01:02:06 -0400 |
commit | 7ef527377b88ff05fb122a47619ea506c631c914 (patch) | |
tree | 2c2e774527d5f591b975834f43e8c6fd12fb38f2 /drivers/net/sfc/siena.c | |
parent | 47d29646a2c1c147d8a7598aeac2c87dd71ed638 (diff) | |
parent | 1183f3838c588545592c042c0ce15015661ce7f2 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net/sfc/siena.c')
-rw-r--r-- | drivers/net/sfc/siena.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/sfc/siena.c b/drivers/net/sfc/siena.c index 7bf93faff3ab..727b4228e081 100644 --- a/drivers/net/sfc/siena.c +++ b/drivers/net/sfc/siena.c | |||
@@ -475,8 +475,17 @@ static int siena_try_update_nic_stats(struct efx_nic *efx) | |||
475 | 475 | ||
476 | static void siena_update_nic_stats(struct efx_nic *efx) | 476 | static void siena_update_nic_stats(struct efx_nic *efx) |
477 | { | 477 | { |
478 | while (siena_try_update_nic_stats(efx) == -EAGAIN) | 478 | int retry; |
479 | cpu_relax(); | 479 | |
480 | /* If we're unlucky enough to read statistics wduring the DMA, wait | ||
481 | * up to 10ms for it to finish (typically takes <500us) */ | ||
482 | for (retry = 0; retry < 100; ++retry) { | ||
483 | if (siena_try_update_nic_stats(efx) == 0) | ||
484 | return; | ||
485 | udelay(100); | ||
486 | } | ||
487 | |||
488 | /* Use the old values instead */ | ||
480 | } | 489 | } |
481 | 490 | ||
482 | static void siena_start_nic_stats(struct efx_nic *efx) | 491 | static void siena_start_nic_stats(struct efx_nic *efx) |