diff options
Diffstat (limited to 'drivers/net/8139too.c')
-rw-r--r-- | drivers/net/8139too.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 32e66f0d4344..0daf8c15e381 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -1723,13 +1723,18 @@ static int rtl8139_start_xmit (struct sk_buff *skb, struct net_device *dev) | |||
1723 | } | 1723 | } |
1724 | 1724 | ||
1725 | spin_lock_irqsave(&tp->lock, flags); | 1725 | spin_lock_irqsave(&tp->lock, flags); |
1726 | /* | ||
1727 | * Writing to TxStatus triggers a DMA transfer of the data | ||
1728 | * copied to tp->tx_buf[entry] above. Use a memory barrier | ||
1729 | * to make sure that the device sees the updated data. | ||
1730 | */ | ||
1731 | wmb(); | ||
1726 | RTL_W32_F (TxStatus0 + (entry * sizeof (u32)), | 1732 | RTL_W32_F (TxStatus0 + (entry * sizeof (u32)), |
1727 | tp->tx_flag | max(len, (unsigned int)ETH_ZLEN)); | 1733 | tp->tx_flag | max(len, (unsigned int)ETH_ZLEN)); |
1728 | 1734 | ||
1729 | dev->trans_start = jiffies; | 1735 | dev->trans_start = jiffies; |
1730 | 1736 | ||
1731 | tp->cur_tx++; | 1737 | tp->cur_tx++; |
1732 | wmb(); | ||
1733 | 1738 | ||
1734 | if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) | 1739 | if ((tp->cur_tx - NUM_TX_DESC) == tp->dirty_tx) |
1735 | netif_stop_queue (dev); | 1740 | netif_stop_queue (dev); |