]> 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 78a01880931c0853ff4a2dedfcb35034c5e690f6..9f07b85091f376a678dbd0c67e2388ffcabd6715 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;