Revert "r8169: remove unneeded mmiowb barriers"
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 10 Feb 2019 14:26:07 +0000 (15:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 10 Feb 2019 20:54:48 +0000 (12:54 -0800)
This reverts commit bd7153bd83b806bfcc2e79b7a6f43aa653d06ef3.

There doesn't seem to be anything wrong with this patch,
it's just reverted to get a stable baseline again.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c

index abb94c543aa2ba6c51b5fa3ae9d9a83f46a1d19f..bba806ce57d35dcd9f4f746d534a24a6cf32a873 100644 (file)
@@ -1286,11 +1286,13 @@ static u16 rtl_get_events(struct rtl8169_private *tp)
 static void rtl_ack_events(struct rtl8169_private *tp, u16 bits)
 {
        RTL_W16(tp, IntrStatus, bits);
+       mmiowb();
 }
 
 static void rtl_irq_disable(struct rtl8169_private *tp)
 {
        RTL_W16(tp, IntrMask, 0);
+       mmiowb();
 }
 
 #define RTL_EVENT_NAPI_RX      (RxOK | RxErr)
@@ -6130,8 +6132,10 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
        if (unlikely(stop_queue))
                netif_stop_queue(dev);
 
-       if (__netdev_sent_queue(dev, skb->len, skb->xmit_more))
+       if (__netdev_sent_queue(dev, skb->len, skb->xmit_more)) {
                RTL_W8(tp, TxPoll, NPQ);
+               mmiowb();
+       }
 
        if (unlikely(stop_queue)) {
                /* Sync with rtl_tx:
@@ -6483,7 +6487,9 @@ static int rtl8169_poll(struct napi_struct *napi, int budget)
 
        if (work_done < budget) {
                napi_complete_done(napi, work_done);
+
                rtl_irq_enable(tp);
+               mmiowb();
        }
 
        return work_done;