From: Birger Koblitz <mail@birger-koblitz.de>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Chih Kai Hsu <hsu.chih.kai@realtek.com>,
Birger Koblitz <mail@birger-koblitz.de>
Subject: [PATCH net-next v2 3/4] r8152: Add irq mitigation for RTL8157/9
Date: Wed, 29 Apr 2026 19:01:11 +0200 [thread overview]
Message-ID: <20260429-rtl8159_net_next-v2-3-bab3cd4e4c66@birger-koblitz.de> (raw)
In-Reply-To: <20260429-rtl8159_net_next-v2-0-bab3cd4e4c66@birger-koblitz.de>
Add interrupt mitigation code for both RTL8157 and RTL8159 that prevents
USB interrupt callbacks with urb->status ESHUTDOWN being triggered. While the
issue is rarely seen on the RTL8157, without the mitigation, it is
common on the RTL8159:
[273.561863] r8152 7-1:1.0 enx88c9b3b5xxxx: Stop submitting intr, status -108
Signed-off-by: Birger Koblitz <mail@birger-koblitz.de>
---
drivers/net/usb/r8152.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 2a07dde289e2240b221664ae5c5bceec35b5a1ef..9fcad3dac76f8aa76ef074cabd3b08348dc234bc 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -8452,6 +8452,12 @@ static void r8156_init(struct r8152 *tp)
else
r8153_u2p3en(tp, false);
+ if (tp->version >= RTL_VER_16) {
+ /* Disable Interrupt Mitigation */
+ ocp_byte_clr_bits(tp, MCU_TYPE_USB, 0xcf04,
+ BIT(0) | BIT(1) | BIT(2) | BIT(7));
+ }
+
/* MSC timer = 0xfff * 8ms = 32760 ms */
ocp_write_word(tp, MCU_TYPE_USB, USB_MSC_TIMER, 0x0fff);
--
2.47.3
next prev parent reply other threads:[~2026-04-29 17:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 17:01 [PATCH net-next v2 0/4] r8152: Add support for the RTL8159 10Gbit USB Ethernet chip Birger Koblitz
2026-04-29 17:01 ` [PATCH net-next v2 1/4] r8152: Add support for 10Gbit Link Speeds and EEE Birger Koblitz
2026-05-01 1:15 ` Jakub Kicinski
2026-05-02 4:18 ` Birger Koblitz
2026-04-29 17:01 ` [PATCH net-next v2 2/4] r8152: Add support for the RTL8159 chip Birger Koblitz
2026-05-01 1:15 ` Jakub Kicinski
2026-05-02 4:39 ` Birger Koblitz
2026-04-29 17:01 ` Birger Koblitz [this message]
2026-05-01 1:16 ` [PATCH net-next v2 3/4] r8152: Add irq mitigation for RTL8157/9 Jakub Kicinski
2026-05-02 4:41 ` Birger Koblitz
2026-04-29 17:01 ` [PATCH net-next v2 4/4] r8152: Add firmware upload capability for RTL8157/RTL8159 Birger Koblitz
2026-04-29 22:01 ` [PATCH net-next v2 0/4] r8152: Add support for the RTL8159 10Gbit USB Ethernet chip Aleksander Jan Bajkowski
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=20260429-rtl8159_net_next-v2-3-bab3cd4e4c66@birger-koblitz.de \
--to=mail@birger-koblitz.de \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hsu.chih.kai@realtek.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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