summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sun
diff options
context:
space:
mode:
authorShannon Nelson <shannon.nelson@oracle.com>2017-02-13 10:57:00 -0800
committerDavid S. Miller <davem@davemloft.net>2017-02-14 13:04:09 -0500
commitfd263fb6e718c5bdf35cbc1de4f781c71794d2a4 (patch)
tree8569adf9d2f8d2ebc2db0fb5cd109127ec08d129 /drivers/net/ethernet/sun
parentf2f3e210bffe5c8f8b30d0b0c7b0f733ff5db334 (diff)
downloadlinux-fd263fb6e718c5bdf35cbc1de4f781c71794d2a4.tar.bz2
sunvnet: add memory barrier before check for tx enable
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>
Diffstat (limited to 'drivers/net/ethernet/sun')
-rw-r--r--drivers/net/ethernet/sun/sunvnet_common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet_common.c b/drivers/net/ethernet/sun/sunvnet_common.c
index 0f940f0e488d..623363bf08df 100644
--- a/drivers/net/ethernet/sun/sunvnet_common.c
+++ b/drivers/net/ethernet/sun/sunvnet_common.c
@@ -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);
}