r8169: missing barriers.
authorFrancois Romieu <romieu@fr.zoreil.com>
Fri, 27 Jan 2012 14:05:38 +0000 (15:05 +0100)
committerFrancois Romieu <romieu@fr.zoreil.com>
Fri, 27 Jan 2012 17:44:59 +0000 (18:44 +0100)
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
drivers/net/ethernet/realtek/r8169.c

index 610f4b3655c7c23e332a80b2484db7135ba664fa..8dd13f5a9203f7cdae46127b7eff8c4ea39e05c1 100644 (file)
@@ -5552,7 +5552,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
 
        if (TX_BUFFS_AVAIL(tp) < MAX_SKB_FRAGS) {
                netif_stop_queue(dev);
-               smp_rmb();
+               smp_mb();
                if (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)
                        netif_wake_queue(dev);
        }
@@ -5653,7 +5653,7 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
 
        if (tp->dirty_tx != dirty_tx) {
                tp->dirty_tx = dirty_tx;
-               smp_wmb();
+               smp_mb();
                if (netif_queue_stopped(dev) &&
                    (TX_BUFFS_AVAIL(tp) >= MAX_SKB_FRAGS)) {
                        netif_wake_queue(dev);
@@ -5664,7 +5664,6 @@ static void rtl8169_tx_interrupt(struct net_device *dev,
                 * of start_xmit activity is detected (if it is not detected,
                 * it is slow enough). -- FR
                 */
-               smp_rmb();
                if (tp->cur_tx != dirty_tx)
                        RTL_W8(TxPoll, NPQ);
        }