Skip to content

Commit

Permalink
sfc: Add rmb() between reading stats and generation count to ensure c…
Browse files Browse the repository at this point in the history
…onsistency

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
  • Loading branch information
Jon Cooper authored and Ben Hutchings committed Oct 4, 2013
1 parent 5e8a402 commit d546a89
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/sfc/ef10.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ static int efx_ef10_try_update_nic_stats(struct efx_nic *efx)
rmb();
efx_nic_update_stats(efx_ef10_stat_desc, EF10_STAT_COUNT, stats_mask,
stats, efx->stats_buffer.addr, false);
rmb();
generation_start = dma_stats[MC_CMD_MAC_GENERATION_START];
if (generation_end != generation_start)
return -EAGAIN;
Expand Down

0 comments on commit d546a89

Please sign in to comment.