RE: [PATCH rtw-next v4 4/4] wifi: rtw88: sdio: Split rtw_sdio_rx_isr into 8051 and 3081 variants

From: Ping-Ke Shih

Date: Mon Oct 05 2026 - 22:09:29 EST


Alastair D'Silva <alastair@xxxxxxxxxxx> wrote:
> Split rtw_sdio_rx_isr() into separate 8051 and 3081 variants to be
> clear. The two differences between the architectures are:
> - Register size: REG_SDIO_RX0_REQ_LEN is 16-bit on 8051, 32-bit on 3081.
> - HISR behavior: 8051 re-reads REG_SDIO_HISR on each iteration, while
> 3081 drains based on rx_len without re-reading HISR.
>
> This is a refactoring without any logic changes.
>
> Assisted-by: LLM
> Signed-off-by: Alastair D'Silva <alastair@xxxxxxxxxxx>

Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>


[...]

> + /* Stop if no more RX requests are pending, even if

nit: keep first line of block comment as empty.

> + * rx_len could be greater than zero in the next
> + * iteration. This is needed because the RX buffer may
> + * already contain data while either HW or FW are not
> + * done filling that buffer yet. Still reading the
> + * buffer can result in packets where
> + * rtw_rx_pkt_stat.pkt_len is zero or points beyond the
> + * end of the buffer.
> + */
> + hisr = rtw_read32(rtwdev, REG_SDIO_HISR);
> } while (total_rx_bytes < SZ_64K && hisr & REG_SDIO_HISR_RX_REQUEST);
> }
>