Re: [PATCH rtw-next v4 2/4] wifi: rtw88: sdio: Track running state and cancel TX worker on stop

From: Luka Gejak

Date: Tue Oct 06 2026 - 10:18:43 EST


October 6, 2026 at 16:03, "Luka Gejak" <luka.gejak@xxxxxxxxx mailto:luka.gejak@xxxxxxxxx?to=%22Luka%20Gejak%22%20%3Cluka.gejak%40linux.dev%3E > wrote:


>
> October 6, 2026 at 04:03, "Ping-Ke Shih" <pkshih@xxxxxxxxxxx mailto:pkshih@xxxxxxxxxxx?to=%22Ping-Ke%20Shih%22%20%3Cpkshih%40realtek.com%3E > wrote:
>
> >
> > Alastair D'Silva <alastair@xxxxxxxxxxx> wrote:
> >
[...]
> >
> > static void rtw_sdio_deep_ps_enter(struct rtw_dev *rtwdev)
> > @@ -1470,6 +1476,9 @@ static void rtw_sdio_handle_interrupt(struct sdio_func *sdio_func)
> > rtwdev = hw->priv;
> > rtwsdio = (struct rtw_sdio *)rtwdev->priv;
> >
> > + if (!rtwsdio->running)
> > + return;
> > +
> >
> I think we should keep this check too, per my explanation below.
>

Correction, as I realized I didn't include explanation for this below.

Sorry for that, here is the explanation:

This check sits on the interrupt path, which the cancel does not
cover. rtw_sdio_stop() only masks HIMR. The SDIO IRQ is released in
rtw_sdio_free_irq():

sdio_release_irq(sdio_func);

and that only runs at remove. A request raised just before the mask
can still reach the handler once after a stop, and without the check
that run reads HISR and writes the ack back on a stopped device.

Best regards,
Luka Gejak