projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a620e13
)
sfc: Insert read memory barrier after checking MAC statistics flag
author
Ben Hutchings
<bhutchings@solarflare.com>
Mon, 1 Sep 2008 11:50:08 +0000
(12:50 +0100)
committer
Jeff Garzik
<jgarzik@redhat.com>
Wed, 24 Sep 2008 22:54:40 +0000
(18:54 -0400)
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>
drivers/net/sfc/falcon.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/sfc/falcon.c
b/drivers/net/sfc/falcon.c
index 70c681ecdabe69daceef77b06e70e440e5d30bb9..3a5289fe8d1d45768d57a25e4176e1a6c5cf7f6e 100644
(file)
--- 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)
/* Wait for transfer to complete */
for (i = 0; i < 400; i++) {
- if (*(volatile u32 *)dma_done == FALCON_STATS_DONE)
+ if (*(volatile u32 *)dma_done == FALCON_STATS_DONE) {
+ rmb(); /* Ensure the stats are valid. */
return 0;
+ }
udelay(10);
}