]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 7 Jul 2016 00:37:24 +0000 (17:37 -0700)
Orabug: 23221795

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>
(cherry picked from commit b67daab033293b3882ba4dc926ffb084d70044e0)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index 7b798c28ff555b938e73e3ce7db3b15e9638338c..99be94d4c6e329d5deb3fc8aa1d23529f672af59 100644 (file)
@@ -1497,7 +1497,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. */