RE: [PATCH v8 6/6] wifi: rtw88: sdio: add TX back-pressure and retry on page starvation

From: Luka Gejak

Date: Fri Aug 28 2026 - 05:51:00 EST


Hi Ping-Ke,

On August 28, 2026 11:29:29 AM GMT+02:00, Ping-Ke Shih <pkshih@xxxxxxxxxxx> wrote:

> At the last review (I think v9), I will focus on the changes of this
> patchset doesn't affect existing chips.

That is the right thing to focus on and it is the part I cannot test, so
let me set out what the other parts actually run, and correct something
in the v8 cover letter while I am at it.

New code that is not behind rtw_is_8723bs(), all of it structural:

sdio.h struct delayed_work work
rtw_sdio_init_tx() INIT_DELAYED_WORK(), mutex_init(), and
mutex_destroy() on its error path
rtw_sdio_tx_kick_off() mod_delayed_work(..., 0) in place of
queue_work()
rtw_sdio_deinit_tx() cancel_delayed_work_sync(), mutex_destroy()

Only this chip ever arms a delay, so on the other parts the work is
still queued immediately, and only this chip ever takes the mutex.

Two existing functions were also restructured and every chip runs
through them, so I should not describe the above as the whole story.
rtw_sdio_process_tx_queue() now returns a value instead of void, and
rtw_sdio_tx_handler() uses it. The behaviour is meant to be identical
for the other parts: on an empty queue the new "if (ret > 0) break"
takes the place of the old skb_queue_empty() break, and on a failed
write the frame is still requeued and the loop still retries, since
rtw_sdio_8723bs_reschedule_tx() returns false for anything that is not
this chip. That is the piece I would most like you to check.

Two things I verified against the base commit that I will spell out in
the v9 cover letter rather than leave implied:
rtw_sdio_check_free_txpg() differs by exactly one inserted branch ahead
of the existing 8051 test, which becomes an else if, everything else
unchanged; and the generic path through rtw_sdio_write_port() is step
for step what it was, same address from skb->len, same
sdio_align_size(), same check, same transfer, same failure message.

The correction: the v8 cover letter says patch 2 is "gated on the SDIO
interface rather than the chip id". That was true of an earlier version
and I did not update it. The code you have uses rtw_is_8723bs(), so it
is gated on the chip id as well, and the sentence understates how narrow
the check is. I will fix that section in v9.

One thing that would settle this better than any argument from me. rtw88
already supports five other SDIO parts that share sdio.c: RTL8723CS,
RTL8723DS, RTL8821CS, RTL8822BS and RTL8822CS. If anyone on the list has
any of them, a boot and some traffic with this series applied would
answer the question directly. I do not have that hardware. If nobody
does, I will say so in the cover letter rather than let it look tested.

Best regards,
Luka Gejak