Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 190374
b: refs/heads/master
c: aabc564
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Apr 28, 2010
1 parent 0764381 commit 6a5e984
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0786693404cffd80ca3cb6e75ee7b35186b2825
refs/heads/master: aabc5649078310094cbffb430fcbf9c25b6268f9
13 changes: 11 additions & 2 deletions trunk/drivers/net/sfc/siena.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,17 @@ static int siena_try_update_nic_stats(struct efx_nic *efx)

static void siena_update_nic_stats(struct efx_nic *efx)
{
while (siena_try_update_nic_stats(efx) == -EAGAIN)
cpu_relax();
int retry;

/* If we're unlucky enough to read statistics wduring the DMA, wait
* up to 10ms for it to finish (typically takes <500us) */
for (retry = 0; retry < 100; ++retry) {
if (siena_try_update_nic_stats(efx) == 0)
return;
udelay(100);
}

/* Use the old values instead */
}

static void siena_start_nic_stats(struct efx_nic *efx)
Expand Down

0 comments on commit 6a5e984

Please sign in to comment.