bnxt_en: Use dma_rmb() instead of rmb().
authorMichael Chan <michael.chan@broadcom.com>
Sun, 15 May 2016 07:04:51 +0000 (03:04 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 May 2016 17:35:48 +0000 (13:35 -0400)
Use the weaker but more appropriate dma_rmb() to order the reading of
the completion ring.

Suggested-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 9de1594be7025eb3f3b5e8b46b5fd3ab4e55a4d3..5a0dca3e6ef6a23f08421d9667c5f7d83efe46c8 100644 (file)
@@ -1494,7 +1494,7 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget)
                /* The valid test of the entry must be done first before
                 * reading any further.
                 */
-               rmb();
+               dma_rmb();
                if (TX_CMP_TYPE(txcmp) == CMP_TYPE_TX_L2_CMP) {
                        tx_pkts++;
                        /* return full budget so NAPI will complete. */