diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-09-01 07:50:08 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-24 18:54:40 -0400 |
commit | 1d0680fd6235e0aa5baf14a8f1ff85eff9dc1fb3 (patch) | |
tree | b113a5c2ca999c4bb33db657e4e5cf81f222ebf3 /drivers/net/sfc | |
parent | a620e134e989b7ce683574039fc7cb956aa58970 (diff) |
sfc: Insert read memory barrier after checking MAC statistics flag
This prevents speculative reading of the statistics before the
completion flag.
From: Neil Turton <nturton@solarflare.com>
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r-- | drivers/net/sfc/falcon.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 70c681ecdabe..3a5289fe8d1d 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -1953,8 +1953,10 @@ int falcon_dma_stats(struct efx_nic *efx, unsigned int done_offset) | |||
1953 | 1953 | ||
1954 | /* Wait for transfer to complete */ | 1954 | /* Wait for transfer to complete */ |
1955 | for (i = 0; i < 400; i++) { | 1955 | for (i = 0; i < 400; i++) { |
1956 | if (*(volatile u32 *)dma_done == FALCON_STATS_DONE) | 1956 | if (*(volatile u32 *)dma_done == FALCON_STATS_DONE) { |
1957 | rmb(); /* Ensure the stats are valid. */ | ||
1957 | return 0; | 1958 | return 0; |
1959 | } | ||
1958 | udelay(10); | 1960 | udelay(10); |
1959 | } | 1961 | } |
1960 | 1962 | ||