qlcnic: add wmb() call in transmit data path.
authorSony Chacko <[email protected]>
Wed, 29 Jun 2016 21:51:34 +0000 (17:51 -0400)
committerDavid S. Miller <[email protected]>
Fri, 1 Jul 2016 08:59:49 +0000 (04:59 -0400)
Call wmb() to ensure writes are complete before
hardware fetches updated Tx descriptors.

Signed-off-by: Sony Chacko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c

index 607bb7d4514d83b3e4de32f7a8abe634f81a5d95..87c642d3b075b2bc9845ba2cdbb4204e788028c3 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;