Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd263fb6 authored by Shannon Nelson's avatar Shannon Nelson Committed by David S. Miller
Browse files

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: default avatarShannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f2f3e210
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1427,6 +1427,7 @@ int sunvnet_start_xmit_common(struct sk_buff *skb, struct net_device *dev,
	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);
	}