From: Sony Chacko Date: Wed, 29 Jun 2016 21:51:34 +0000 (-0400) Subject: qlcnic: add wmb() call in transmit data path. X-Git-Tag: v4.1.12-93~2^2~105 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=8e9112be10a63e39e6fee73d078c8afebbceda54;p=users%2Fjedix%2Flinux-maple.git qlcnic: add wmb() call in transmit data path. Call wmb() to ensure writes are complete before hardware fetches updated Tx descriptors. Signed-off-by: Sony Chacko Signed-off-by: David S. Miller Orabug: 25605962 (cherry picked from commit 9216a97a12b069c62f0e927a9f54be4883648a0f) Signed-off-by: Jack Vogel --- diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c index fdf413b934e35..c854cb89445f7 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c @@ -772,6 +772,8 @@ netdev_tx_t qlcnic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) tx_ring->tx_stats.tx_bytes += skb->len; tx_ring->tx_stats.xmit_called++; + /* Ensure writes are complete before HW fetches Tx descriptors */ + wmb(); qlcnic_update_cmd_producer(tx_ring); return NETDEV_TX_OK;