From: Ping-Ke Shih <pkshih@realtek.com>
To: "luka.gejak@linux.dev" <luka.gejak@linux.dev>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Michael Straube" <straube.linux@gmail.com>,
Bitterblue Smith <rtl8821cerfe2@gmail.com>,
Peter Robinson <pbrobinson@gmail.com>,
"Hans de Goede" <johannes.goede@oss.qualcomm.com>
Subject: RE: [PATCH v4 6/7] wifi: rtw88: sdio: set up RX aggregation and interrupts for RTL8723BS
Date: Fri, 14 Aug 2026 06:41:55 +0000 [thread overview]
Message-ID: <433435852a3d4dd898f20974928b4551@realtek.com> (raw)
In-Reply-To: <20260811091203.26841-7-luka.gejak@linux.dev>
luka.gejak@linux.dev <luka.gejak@linux.dev> wrote:
> From: Luka Gejak <luka.gejak@linux.dev>
>
> Enable the existing RX aggregation setup for this chip and select the
> larger DMA burst count it needs. The RTL8723BS does not raise CPWM1, so
> leave that source out of its interrupt mask, and set the SDIO TX control
> bit the vendor driver uses to have transfers always recognised.
>
> The chip also keeps raising the interrupt after resume if undefined
> status bits are written back when acknowledging, so acknowledge only the
> defined and unmasked bits. That is scoped to this chip; the other SDIO
> parts keep writing the status word back unchanged.
>
> Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
[...]
> @@ -967,12 +974,22 @@ static void rtw_sdio_8723bs_check_rqpn(struct rtw_dev *rtwdev)
>
> static int rtw_sdio_start(struct rtw_dev *rtwdev)
> {
> + u32 clear;
> +
> if (rtw_is_8723bs(rtwdev)) {
> rtw_sdio_8723bs_check_rqpn(rtwdev);
> rtw_sdio_8723bs_init_free_txpg(rtwdev);
> }
>
> rtw_sdio_enable_rx_aggregation(rtwdev);
> +
> + if (rtw_is_8723bs(rtwdev)) {
> + clear = rtw_read32(rtwdev, REG_SDIO_HISR) &
> + RTW_SDIO_HISR_CLEAR_MASK;
Though it is little over 80 characters, straightening it will be more readable.
> + if (clear)
> + rtw_write32(rtwdev, REG_SDIO_HISR, clear);
> + }
> +
> rtw_sdio_enable_interrupt(rtwdev);
>
> return 0;
> @@ -1052,6 +1069,8 @@ static void rtw_sdio_interface_cfg(struct rtw_dev *rtwdev)
>
> val = rtw_read32(rtwdev, REG_SDIO_TX_CTRL);
> val &= 0xfff8;
> + if (rtw_is_8723bs(rtwdev))
> + val |= BIT_SDIO_TX_CTRL_ALWAYS_RECOGNIZE;
> rtw_write32(rtwdev, REG_SDIO_TX_CTRL, val);
> }
>
> @@ -1316,6 +1335,14 @@ static void rtw_sdio_handle_interrupt(struct sdio_func *sdio_func)
> rtw_sdio_rx_isr(rtwdev);
> }
>
> + /*
> + * RTL8723BS keeps raising the interrupt after resume if undefined
> + * status bits are written back, so acknowledge only the bits that are
> + * both defined and unmasked. Other chips keep the existing behaviour.
> + */
> + if (rtw_is_8723bs(rtwdev))
> + hisr &= rtwsdio->irq_mask & RTW_SDIO_HISR_CLEAR_MASK;
> +
I'm not sure if I read something wrong...
rtwsdio->irq_mask = REG_SDIO_HIMR_RX_REQUEST; // BIT(0)
RTW_SDIO_HISR_CLEAR_MASK // BIT(2-7, 17-24)
So, (rtwsdio->irq_mask & RTW_SDIO_HISR_CLEAR_MASK) == 0
Then, hisr &= 0 --> hisr = 0.
Which point is wrong to me?
> rtw_write32(rtwdev, REG_SDIO_HISR, hisr);
>
> rtwsdio->irq_thread = NULL;
[...]
next prev parent reply other threads:[~2026-08-14 6:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 9:11 [PATCH v4 0/7] wifi: rtw88: preparations for RTL8723B/RTL8723BS luka.gejak
2026-08-11 9:11 ` [PATCH v4 1/7] wifi: rtw88: add the RTL8723B chip type and SDIO helper luka.gejak
2026-08-14 7:15 ` Ping-Ke Shih
2026-08-11 9:11 ` [PATCH v4 2/7] wifi: rtw88: rx: mark zero length packets on RTL8723BS luka.gejak
2026-08-14 5:44 ` Ping-Ke Shih
2026-08-11 9:11 ` [PATCH v4 3/7] wifi: rtw88: tx: extend the TX report purge timeout to RTL8723BS luka.gejak
2026-08-14 7:15 ` Ping-Ke Shih
2026-08-11 9:12 ` [PATCH v4 4/7] wifi: rtw88: fw: handle the RTL8723BS management TX reports luka.gejak
2026-08-11 11:42 ` Bitterblue Smith
2026-08-14 5:52 ` Ping-Ke Shih
2026-08-11 9:12 ` [PATCH v4 5/7] wifi: rtw88: sdio: track free TX pages and OQT credits for RTL8723BS luka.gejak
2026-08-14 6:32 ` Ping-Ke Shih
2026-08-11 9:12 ` [PATCH v4 6/7] wifi: rtw88: sdio: set up RX aggregation and interrupts " luka.gejak
2026-08-14 6:41 ` Ping-Ke Shih [this message]
2026-08-11 9:12 ` [PATCH v4 7/7] wifi: rtw88: sdio: add TX back-pressure and retry on page starvation luka.gejak
2026-08-14 7:14 ` 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=433435852a3d4dd898f20974928b4551@realtek.com \
--to=pkshih@realtek.com \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luka.gejak@linux.dev \
--cc=pbrobinson@gmail.com \
--cc=rtl8821cerfe2@gmail.com \
--cc=straube.linux@gmail.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