sfc: Add rmb() between reading stats and generation count to ensure consistency
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
parent
5e8a402f83
commit
d546a89362
|
@ -545,6 +545,7 @@ static int efx_ef10_try_update_nic_stats(struct efx_nic *efx)
|
||||||
rmb();
|
rmb();
|
||||||
efx_nic_update_stats(efx_ef10_stat_desc, EF10_STAT_COUNT, stats_mask,
|
efx_nic_update_stats(efx_ef10_stat_desc, EF10_STAT_COUNT, stats_mask,
|
||||||
stats, efx->stats_buffer.addr, false);
|
stats, efx->stats_buffer.addr, false);
|
||||||
|
rmb();
|
||||||
generation_start = dma_stats[MC_CMD_MAC_GENERATION_START];
|
generation_start = dma_stats[MC_CMD_MAC_GENERATION_START];
|
||||||
if (generation_end != generation_start)
|
if (generation_end != generation_start)
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
|
|
Loading…
Reference in New Issue