]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qlcnic: add wmb() call in transmit data path.
authorSony Chacko <sony.chacko@qlogic.com>
Wed, 29 Jun 2016 21:51:34 +0000 (17:51 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 6 Mar 2017 20:46:52 +0000 (12:46 -0800)
Call wmb() to ensure writes are complete before
hardware fetches updated Tx descriptors.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 25605962
(cherry picked from commit 9216a97a12b069c62f0e927a9f54be4883648a0f)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c

index fdf413b934e352d523bb323deda6f997cbbe9d37..c854cb89445f7c34889bd36cf513366e06c804bc 100644 (file)
@@ -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;