From: "Luka Gejak" <luka.gejak@linux.dev>
To: "Ping-Ke Shih" <pkshih@realtek.com>,
"Alastair D'Silva" <alastair@d-silva.org>,
linux-wireless@vger.kernel.org, "Kalle Valo" <kvalo@kernel.org>
Cc: "Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Ulf Hansson" <ulfh@kernel.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
luka.gejak@linux.dev
Subject: Re: [PATCH rtw-next v4 2/4] wifi: rtw88: sdio: Track running state and cancel TX worker on stop
Date: Tue, 06 Oct 2026 04:44:46 +0000 [thread overview]
Message-ID: <4d0885941b74480c7fd6399b9dff7ed64540a87e@linux.dev> (raw)
In-Reply-To: <6665409e1d374c1face4936b827a6a9d@realtek.com>
October 6, 2026 at 04:03, "Ping-Ke Shih" <pkshih@realtek.com mailto:pkshih@realtek.com?to=%22Ping-Ke%20Shih%22%20%3Cpkshih%40realtek.com%3E > wrote:
>
> Alastair D'Silva <alastair@d-silva.org> wrote:
>
> >
> > When rtw_sdio_stop() disables interrupts, in-flight interrupt handlers or
> > delayed TX work may still run against a powered-down device.
> >
> > Track the operational state in rtwsdio->running (similar to PCI), check it
> > at the entry of rtw_sdio_handle_interrupt() and rtw_sdio_tx_handler(), and
> > cancel the TX worker synchronously in rtw_sdio_stop().
> >
> > Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets")
> > Cc: stable@vger.kernel.org
> > Assisted-by: LLM
> > Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
> > ---
> > drivers/net/wireless/realtek/rtw88/sdio.c | 12 ++++++++++++
> > drivers/net/wireless/realtek/rtw88/sdio.h | 1 +
> > 2 files changed, 13 insertions(+)
> >
> > diff --git a/drivers/net/wireless/realtek/rtw88/sdio.c b/drivers/net/wireless/realtek/rtw88/sdio.c
> > index e39284b71837..d2f4d7e8bc83 100644
> > --- a/drivers/net/wireless/realtek/rtw88/sdio.c
> > +++ b/drivers/net/wireless/realtek/rtw88/sdio.c
> > @@ -1054,6 +1054,7 @@ static int rtw_sdio_8723bs_check_rqpn(struct rtw_dev *rtwdev)
> >
> > static int rtw_sdio_start(struct rtw_dev *rtwdev)
> > {
> > + struct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;
> > u32 clear;
> >
> > if (rtw_is_8723bs(rtwdev)) {
> > @@ -1075,6 +1076,7 @@ static int rtw_sdio_start(struct rtw_dev *rtwdev)
> > rtw_write32(rtwdev, REG_SDIO_HISR, clear);
> > }
> >
> > + rtwsdio->running = true;
> >
> Is there existing race between start/stop/interrupt? Need a lock?
>
> >
> > rtw_sdio_enable_interrupt(rtwdev);
> >
> > return 0;
> > @@ -1082,7 +1084,11 @@ static int rtw_sdio_start(struct rtw_dev *rtwdev)
> >
> > static void rtw_sdio_stop(struct rtw_dev *rtwdev)
> > {
> > + struct rtw_sdio *rtwsdio = (struct rtw_sdio *)rtwdev->priv;
> > +
> > + rtwsdio->running = false;
> > rtw_sdio_disable_interrupt(rtwdev);
> > + cancel_delayed_work_sync(&rtwsdio->tx_handler_data->work);
> >
> I think this is the major statement added by this patch, but I'm not sure
> if this is actually needed. (Maybe, Luka can help this)
>
I will take a look at this series later during the day.
> By 'git blame', the work is added by
> 28eaf7971a20 ("wifi: rtw88: sdio: add TX back-pressure and retry on page starvation")
>
> Maybe, the fixes tag should be 28eaf7971a20. I think there is no way to apply this
> to 65371a3f14e7 (your fixes tag)
>
>
Best regards,
Luka Gejak
next prev parent reply other threads:[~2026-10-06 4:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 8:48 [PATCH rtw-next v4 0/4] wifi: rtw88: sdio: Fix unhandled RX request interrupt storm Alastair D'Silva
2026-10-05 8:48 ` [PATCH rtw-next v4 1/4] wifi: rtw88: sdio: Handle allocation and read errors in rtw_sdio_rxfifo_recv Alastair D'Silva
2026-10-06 1:35 ` Ping-Ke Shih
2026-10-05 8:48 ` [PATCH rtw-next v4 2/4] wifi: rtw88: sdio: Track running state and cancel TX worker on stop Alastair D'Silva
2026-10-06 2:03 ` Ping-Ke Shih
2026-10-06 4:44 ` Luka Gejak [this message]
2026-10-05 8:48 ` [PATCH rtw-next v4 3/4] wifi: rtw88: sdio: Fix unhandled RX request interrupt storm Alastair D'Silva
2026-10-06 2:05 ` Ping-Ke Shih
2026-10-05 8:48 ` [PATCH rtw-next v4 4/4] wifi: rtw88: sdio: Split rtw_sdio_rx_isr into 8051 and 3081 variants Alastair D'Silva
2026-10-06 2:08 ` 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=4d0885941b74480c7fd6399b9dff7ed64540a87e@linux.dev \
--to=luka.gejak@linux.dev \
--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=martin.blumenstingl@googlemail.com \
--cc=pkshih@realtek.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®