linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: chris.chiu@canonical.com
To: Jes.Sorensen@gmail.com, kvalo@codeaurora.org,
	davem@davemloft.net, kuba@kernel.org, code@reto-schneider.ch
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Chris Chiu <chris.chiu@canonical.com>
Subject: [PATCH] rtl8xxxu: disable interrupt_in transfer for 8188cu and 8192cu
Date: Fri,  2 Jul 2021 00:33:54 +0800	[thread overview]
Message-ID: <20210701163354.118403-1-chris.chiu@canonical.com> (raw)

From: Chris Chiu <chris.chiu@canonical.com>

There will be crazy numbers of interrupts triggered by 8188cu and
8192cu module, around 8000~10000 interrupts per second, on the usb
host controller. Compare with the vendor driver source code, it's
mapping to the configuration CONFIG_USB_INTERRUPT_IN_PIPE and it is
disabled by default.

Since the interrupt transfer is neither used for TX/RX nor H2C
commands. Disable it to avoid the confusing interrupts for the
8188cu and 8192cu module which I only have for verification.

Signed-off-by: Chris Chiu <chris.chiu@canonical.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 03c6ed7efe06..6a3dfa71b27f 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -1670,7 +1670,7 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)
 			priv->rf_paths = 2;
 			priv->rx_paths = 2;
 			priv->tx_paths = 2;
-			priv->usb_interrupts = 1;
+			priv->usb_interrupts = 0;
 			priv->rtl_chip = RTL8192C;
 		}
 		priv->has_wifi = 1;
@@ -1680,7 +1680,7 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)
 		priv->rx_paths = 1;
 		priv->tx_paths = 1;
 		priv->rtl_chip = RTL8188C;
-		priv->usb_interrupts = 1;
+		priv->usb_interrupts = 0;
 		priv->has_wifi = 1;
 	}
 
-- 
2.20.1


             reply	other threads:[~2021-07-01 16:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 16:33 chris.chiu [this message]
2021-07-02  8:41 ` [PATCH] rtl8xxxu: disable interrupt_in transfer for 8188cu and 8192cu Kalle Valo
2021-07-05  9:00   ` Chris Chiu
2021-07-05  0:35 ` Reto Schneider
2021-07-06 17:35 ` Jes Sorensen
2021-08-21 18:17 ` Kalle Valo

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=20210701163354.118403-1-chris.chiu@canonical.com \
    --to=chris.chiu@canonical.com \
    --cc=Jes.Sorensen@gmail.com \
    --cc=code@reto-schneider.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).