diff options
author | Sinan Kaya <okaya@codeaurora.org> | 2018-03-25 10:39:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-26 12:47:55 -0400 |
commit | edd874235ac20a04483f15b27251203e9508dec5 (patch) | |
tree | ba3bfae798e8789e352faeb9d66fe352aff1a48a /drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | |
parent | f9442ac498a86b1b0ec383a332be2635fbb1ed98 (diff) | |
download | talos-op-linux-edd874235ac20a04483f15b27251203e9508dec5.tar.gz talos-op-linux-edd874235ac20a04483f15b27251203e9508dec5.zip |
bnx2x: Replace doorbell barrier() with wmb()
barrier() doesn't guarantee memory writes to be observed by the hardware on
all architectures. barrier() only tells compiler not to move this code
with respect to other read/writes.
If memory write needs to be observed by the HW, wmb() is the right choice.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c index 1e33abde4a3e..39af4f85379d 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c @@ -2591,7 +2591,8 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode) wmb(); txdata->tx_db.data.prod += 2; - barrier(); + /* make sure descriptor update is observed by the HW */ + wmb(); DOORBELL(bp, txdata->cid, txdata->tx_db.raw); mmiowb(); |