From: Ping-Ke Shih <pkshih@realtek.com>
To: Alastair D'Silva <alastair@d-silva.org>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Ulf Hansson <ulfh@kernel.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Kalle Valo <kvalo@kernel.org>, Luka Gejak <luka.gejak@linux.dev>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [PATCH v3 1/2] wifi: rtw88: sdio: Fix unhandled RX request interrupt storm
Date: Mon, 5 Oct 2026 03:35:31 +0000 [thread overview]
Message-ID: <661b9fc47ce942a491f8c53d90fdf39a@realtek.com> (raw)
In-Reply-To: <20261001000303.3505264-2-alastair@d-silva.org>
Alastair D'Silva <alastair@d-silva.org> wrote:
> 8051 and 3081 SDIO chipsets handle the REG_SDIO_HISR_RX_REQUEST status bit
> differently:
>
> - 8051-based chips (e.g. RTL8723BS, RTL8723CS, RTL8723DS):
> The hardware automatically clears REG_SDIO_HISR_RX_REQUEST once the RX
> buffer is empty. Software must not clear this bit, because the drain
> loop in rtw_sdio_rx_isr() re-reads REG_SDIO_HISR across iterations to
> decide whether more requests are pending. Clearing it in software
> terminates the loop after a single request, stranding the remainder of
> the FIFO. Additionally, RTL8723BS requires RTW_SDIO_HISR_CLEAR_MASK to
> avoid undefined bits causing resume storms.
>
> - 3081-based chips (e.g. RTL8821CS, RTL8822CS):
> The hardware does not automatically clear REG_SDIO_HISR_RX_REQUEST when
> the RX buffer is empty. Masking this bit out in software before writing
> back to HISR prevented it from ever being acknowledged in hardware,
> trapping the CPU core in an infinite interrupt storm loop that starved
> RCU and locked up the system. Furthermore, on 3081 chips the physical
> RX FIFO capacity is at most 24 KB (16 KB on RTL8821CS, 24 KB on
> RTL8822CS), which is well within the 64 KB loop budget.
>
> As the number of architecture-specific special cases has grown (16-bit vs
> 32-bit register widths, differing HISR writeback timing, synthetic loop
> flags, and RTL8723BS resume masking), attempting to accommodate both
> architectures within a single monolithic handler has become fragile and
> prone to cross-architecture regressions.
>
> Resolve this by making rtw_sdio_handle_interrupt() a dispatcher with
> separate paths for 8051 and 3081:
>
> 1. 8051 chips preserve the existing unmasked writeback behavior, leaving
> REG_SDIO_HISR_RX_REQUEST for hardware to drop and respecting
> RTW_SDIO_HISR_CLEAR_MASK on RTL8723BS.
> 2. 3081 chips adopt the interrupt masking pattern: disable HIMR,
> acknowledge pending status bits in HISR via W1C, service the pending
> events, and re-enable HIMR. Any packet arriving during servicing
> latches REG_SDIO_HISR_RX_REQUEST in hardware and re-asserts the IRQ line
> once unmasked.
>
> Splitting into separate handlers isolates these quirks cleanly and
> simplifies future maintenance.
>
> Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets")
At this moment, did it support 3081-seris already?
I feel this tag is too serious.
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
next prev parent reply other threads:[~2026-10-05 3:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 0:03 [PATCH v3 0/2] wifi: rtw88: sdio: Fix interrupt storm on 3081 chips and split RX handling Alastair D'Silva
2026-10-01 0:03 ` [PATCH v3 1/2] wifi: rtw88: sdio: Fix unhandled RX request interrupt storm Alastair D'Silva
2026-10-01 6:02 ` Luka Gejak
2026-10-05 3:35 ` Ping-Ke Shih [this message]
2026-10-05 4:39 ` Luka Gejak
2026-10-05 5:30 ` Ping-Ke Shih
2026-10-05 6:44 ` Alastair D'Silva
2026-10-05 6:57 ` Ping-Ke Shih
2026-10-05 8:20 ` Alastair D'Silva
2026-10-05 8:43 ` Ping-Ke Shih
2026-10-01 0:03 ` [PATCH v3 2/2] wifi: rtw88: sdio: Split rtw_sdio_rx_isr into 8051 and 3081 variants Alastair D'Silva
2026-10-05 3:41 ` Ping-Ke Shih
2026-10-02 2:15 ` [PATCH v3 0/2] wifi: rtw88: sdio: Fix interrupt storm on 3081 chips and split RX handling Ping-Ke Shih
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=661b9fc47ce942a491f8c53d90fdf39a@realtek.com \
--to=pkshih@realtek.com \
--cc=alastair@d-silva.org \
--cc=jernej.skrabec@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luka.gejak@linux.dev \
--cc=martin.blumenstingl@googlemail.com \
--cc=stable@vger.kernel.org \
--cc=ulfh@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
all inboxes | Powered by JetHome®