From: Shannon Nelson Date: Mon, 13 Feb 2017 18:57:00 +0000 (-0800) Subject: sunvnet: add memory barrier before check for tx enable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fd263fb6e718c5bdf35cbc1de4f781c71794d2a4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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); }