]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
sfc: Add rmb() between reading stats and generation count to ensure consistency
authorJon Cooper <jcooper@solarflare.com>
Fri, 27 Sep 2013 17:26:30 +0000 (18:26 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Fri, 4 Oct 2013 22:31:50 +0000 (23:31 +0100)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/ef10.c

index 9f18ae984f9ed38386b16e5284d4d10864687c4b..a4fbb383ac639a9aa8c685a16477f2adf15cf32e 100644 (file)
@@ -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;