All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Realtek linux nic maintainers <nic_swsd@realtek.com>,
	David Miller <davem@davemloft.net>
Cc: Sander Eikelenboom <linux@eikelenboom.it>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH v2 net 1/2] Revert "r8169: remove unneeded mmiowb barriers"
Date: Sun, 10 Feb 2019 15:26:07 +0100	[thread overview]
Message-ID: <62b828d9-f90a-059c-e61a-e747c389d44d@gmail.com> (raw)
In-Reply-To: <63e9e767-f78b-8865-fe25-41d77e4e7a58@gmail.com>

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>
---
 drivers/net/ethernet/realtek/r8169.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index abb94c543aa2..bba806ce57d3 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -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;
-- 
2.20.1




  reply	other threads:[~2019-02-10 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-10 14:24 [PATCH v2 net 0/2] r8169: revert two commits due to a regression Heiner Kallweit
2019-02-10 14:26 ` Heiner Kallweit [this message]
2019-02-10 14:28 ` [PATCH v2 net 2/2] Revert "r8169: make use of xmit_more and __netdev_sent_queue" Heiner Kallweit
2019-02-10 20:57 ` [PATCH v2 net 0/2] r8169: revert two commits due to a regression David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=62b828d9-f90a-059c-e61a-e747c389d44d@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux@eikelenboom.it \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.