]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
bnx2x: Prevent load reordering in tx completion processing
[thirdparty/kernel/stable.git] / drivers / net / ethernet / broadcom / bnx2x / bnx2x_cmn.c
index 656ed80647f0275ce813ac51792bcb0d11586690..e2be5a685130dce81c5371dcd9df8d6ff72ccc0c 100644 (file)
@@ -285,6 +285,9 @@ int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata)
        hw_cons = le16_to_cpu(*txdata->tx_cons_sb);
        sw_cons = txdata->tx_pkt_cons;
 
+       /* Ensure subsequent loads occur after hw_cons */
+       smp_rmb();
+
        while (sw_cons != hw_cons) {
                u16 pkt_cons;