diff options
author | Sinan Kaya <okaya@codeaurora.org> | 2018-03-25 17:39:17 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-26 19:47:55 +0300 |
commit | edd874235ac20a04483f15b27251203e9508dec5 (patch) | |
tree | ba3bfae798e8789e352faeb9d66fe352aff1a48a /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |
parent | f9442ac498a86b1b0ec383a332be2635fbb1ed98 (diff) | |
download | linux-edd874235ac20a04483f15b27251203e9508dec5.tar.xz |
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_cmn.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index d7c98e807ca8..0f86f1850de8 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -4153,7 +4153,8 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) wmb(); txdata->tx_db.data.prod += nbd; - barrier(); + /* make sure descriptor update is observed by HW */ + wmb(); DOORBELL(bp, txdata->cid, txdata->tx_db.raw); |