netdev.vger.kernel.org archive mirror
 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: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Chun-Hao Lin <hau@realtek.com>
Subject: [PATCH net-next v2 4/9] r8169: move disabling interrupt coalescing to RTL8169/RTL8168 init
Date: Wed, 28 Aug 2019 22:26:13 +0200	[thread overview]
Message-ID: <de461aca-0b84-4055-d4dc-e3980cb677db@gmail.com> (raw)
In-Reply-To: <8181244b-24ac-73e2-bac7-d01f644ebb3f@gmail.com>

RTL8125 doesn't support the same coalescing registers, therefore move
this initialization to the 8168/6169-specific init.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169_main.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 7d89826cb..dc799528f 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5087,6 +5087,9 @@ static void rtl_hw_start_8168(struct rtl8169_private *tp)
 		RTL_W8(tp, MaxTxPacketSize, TxPacketMax);
 
 	rtl_hw_config(tp);
+
+	/* disable interrupt coalescing */
+	RTL_W16(tp, IntrMitigate, 0x0000);
 }
 
 static void rtl_hw_start_8169(struct rtl8169_private *tp)
@@ -5110,6 +5113,9 @@ static void rtl_hw_start_8169(struct rtl8169_private *tp)
 	rtl8169_set_magic_reg(tp, tp->mac_version);
 
 	RTL_W32(tp, RxMissed, 0);
+
+	/* disable interrupt coalescing */
+	RTL_W16(tp, IntrMitigate, 0x0000);
 }
 
 static void rtl_hw_start(struct  rtl8169_private *tp)
@@ -5128,8 +5134,6 @@ static void rtl_hw_start(struct  rtl8169_private *tp)
 	rtl_set_rx_tx_desc_registers(tp);
 	rtl_lock_config_regs(tp);
 
-	/* disable interrupt coalescing */
-	RTL_W16(tp, IntrMitigate, 0x0000);
 	/* Initially a 10 us delay. Turned it into a PCI commit. - FR */
 	RTL_R8(tp, IntrMask);
 	RTL_W8(tp, ChipCmd, CmdTxEnb | CmdRxEnb);
-- 
2.23.0



  parent reply	other threads:[~2019-08-28 20:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 20:23 [PATCH net-next v2 0/9] r8169: add support for RTL8125 Heiner Kallweit
2019-08-28 20:24 ` [PATCH net-next v2 1/9] r8169: change interrupt mask type to u32 Heiner Kallweit
2019-08-28 20:24 ` [PATCH net-next v2 2/9] r8169: restrict rtl_is_8168evl_up to RTL8168 chip versions Heiner Kallweit
2019-08-28 20:25 ` [PATCH net-next v2 3/9] r8169: factor out reading MAC address from registers Heiner Kallweit
2019-08-28 20:26 ` Heiner Kallweit [this message]
2019-08-28 20:26 ` [PATCH net-next v2 5/9] r8169: read common register for PCI commit Heiner Kallweit
2019-08-28 20:27 ` [PATCH net-next v2 6/9] r8169: don't use bit LastFrag in tx descriptor after send Heiner Kallweit
2019-08-29  0:29   ` Jakub Kicinski
2019-08-28 20:28 ` [PATCH net-next v2 7/9] r8169: add support for RTL8125 Heiner Kallweit
2019-08-28 20:28 ` [PATCH net-next v2 8/9] r8169: add RTL8125 PHY initialization Heiner Kallweit
2019-08-28 20:29 ` [PATCH net-next v2 9/9] r8169: add support for EEE on RTL8125 Heiner Kallweit
2019-08-30  0:47 ` [PATCH net-next v2 0/9] r8169: add support for RTL8125 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=de461aca-0b84-4055-d4dc-e3980cb677db@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=davem@davemloft.net \
    --cc=hau@realtek.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).