]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
sunvnet: add memory barrier before check for tx enable
authorShannon Nelson <shannon.nelson@oracle.com>
Mon, 13 Feb 2017 18:57:00 +0000 (10:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Feb 2017 18:04:09 +0000 (13:04 -0500)
In order to allow the underlying LDC and outstanding memory operations
to potentially catch up with the driver's Tx requests, add a memory
barrier before checking again for available tx descriptors.

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/sun/sunvnet_common.c

index 0f940f0e488db81618262a8c25bff3bfb56b5805..623363bf08dfd1faea243027f9e3fa9f68926966 100644 (file)
@@ -1427,6 +1427,7 @@ ldc_start_done:
        dr->prod = (dr->prod + 1) & (VNET_TX_RING_SIZE - 1);
        if (unlikely(vnet_tx_dring_avail(dr) < 1)) {
                netif_tx_stop_queue(txq);
+               smp_rmb();
                if (vnet_tx_dring_avail(dr) > VNET_TX_WAKEUP_THRESH(dr))
                        netif_tx_wake_queue(txq);
        }