Re: [PATCH rtw-next 3/5] wifi: rtw88: sdio: limit the TX queue length of the 88xx chips
From: David Härdeman
Date: Tue Nov 17 2026 - 07:58:11 EST
On Tue, Nov 17, 2026 at 08:21:50AM +0100, Luka Gejak wrote:
>On November 16, 2026 8:01:43 PM GMT+01:00, "David Härdeman"
><david@xxxxxxxxxxx> wrote:
>
>> + if (ret == -EBUSY && !rtw_chip_wcpu_8051(rtwdev))
>> + resched = true;
>
>I think -ENOMEM needs a retry here too. mmc_io_rw_extended() allocates a
>scatterlist when a transfer needs more than one segment. For example,
>dw_mmc with IDMAC sets max_seg_size to 4096, so an aggregate larger than
>that can fail this allocation and return -ENOMEM.
You're right, I'll fix that in v2.
>> + if (resched)
>> + queue_delayed_work(rtwsdio->txwq, &work_data->work,
>> + RTW_SDIO_TX_RETRY_DELAY);
>
>So if I read it right, this also needs the work to be cancelled when the
>SDIO interface stops. The power off path is:
>
> rtw_power_off()
> rtw_hci_stop()
> rtw_sdio_stop()
> rtw_mac_power_off()
>
>rtw_sdio_stop() only disables interrupts and invalidates the credits.
>The cancellation is in rtw_sdio_deinit_tx(), which closing the interface
>does not call. The flush callback does not drain the SDIO software queues
>either, since the SDIO operations have no flush_queues callback.
>
>A pending retry can therefore run after power off and keep rearming
>while credits are unavailable. The RTL8723BS retry helper seems to have
>the same lifetime gap already, so maybe the shared stop path is the right
>place to fix this before extending the retries to the other chips?
Good catch, and I think this is fixed by Alastair's series, which I'll
base the v2 on (+ Leonard's series).
--
David Härdeman