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>,
	Jakub Kicinski <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH net-next 8/8] r8169: allow setting irq coalescing if link is down
Date: Wed, 17 Jun 2020 22:56:27 +0200	[thread overview]
Message-ID: <aae18a90-b9f9-5801-730b-8ee5ea81f370@gmail.com> (raw)
In-Reply-To: <ef2a4cd4-1492-99d8-f94f-319eeb129137@gmail.com>

So far we can not configure irq coalescing when link is down. Allow the
user to do this, and assume that he wants to configure irq coalescing
for highest speed. Otherwise the irq rate is low enough anyway.

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

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index d55bf2cd2..a3c4187d9 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -1731,16 +1731,16 @@ struct rtl_coalesce_info {
 #define COALESCE_DELAY(d) { (d), 8 * (d), 16 * (d), 32 * (d) }
 
 static const struct rtl_coalesce_info rtl_coalesce_info_8169[] = {
-	{ SPEED_10,	COALESCE_DELAY(40960) },
-	{ SPEED_100,	COALESCE_DELAY(2560) },
 	{ SPEED_1000,	COALESCE_DELAY(320) },
+	{ SPEED_100,	COALESCE_DELAY(2560) },
+	{ SPEED_10,	COALESCE_DELAY(40960) },
 	{ 0 },
 };
 
 static const struct rtl_coalesce_info rtl_coalesce_info_8168_8136[] = {
-	{ SPEED_10,	COALESCE_DELAY(40960) },
-	{ SPEED_100,	COALESCE_DELAY(2560) },
 	{ SPEED_1000,	COALESCE_DELAY(5000) },
+	{ SPEED_100,	COALESCE_DELAY(2560) },
+	{ SPEED_10,	COALESCE_DELAY(40960) },
 	{ 0 },
 };
 #undef COALESCE_DELAY
@@ -1756,6 +1756,10 @@ rtl_coalesce_info(struct rtl8169_private *tp)
 	else
 		ci = rtl_coalesce_info_8168_8136;
 
+	/* if speed is unknown assume highest one */
+	if (tp->phydev->speed == SPEED_UNKNOWN)
+		return ci;
+
 	for (; ci->speed; ci++) {
 		if (tp->phydev->speed == ci->speed)
 			return ci;
-- 
2.27.0



  parent reply	other threads:[~2020-06-17 20:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 20:50 [PATCH net-next 0/8] r8169: smaller improvements again Heiner Kallweit
2020-06-17 20:51 ` [PATCH net-next 1/8] r8169: add info for DASH being enabled Heiner Kallweit
2020-06-17 20:51 ` [PATCH net-next 2/8] r8169: remove unused constant RsvdMask Heiner Kallweit
2020-06-17 20:52 ` [PATCH net-next 3/8] r8169: improve setting WoL on runtime-resume Heiner Kallweit
2020-06-17 20:53 ` [PATCH net-next 4/8] r8169: replace synchronize_rcu with synchronize_net Heiner Kallweit
2020-06-17 20:54 ` [PATCH net-next 5/8] r8169: move napi_disable call and rename rtl8169_hw_reset Heiner Kallweit
2020-06-17 20:54 ` [PATCH net-next 6/8] r8169: move updating counters to rtl8169_down Heiner Kallweit
2020-06-17 20:55 ` [PATCH net-next 7/8] r8169: move switching optional clock on/off to pll power functions Heiner Kallweit
2020-06-17 20:56 ` Heiner Kallweit [this message]
2020-06-19  3:40 ` [PATCH net-next 0/8] r8169: smaller improvements again 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=aae18a90-b9f9-5801-730b-8ee5ea81f370@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --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).