Re: [PATCH rtw-next] wifi: rtl8xxxu: isolate the USB register buffer from CPU state
From: Ping-Ke Shih
Date: Mon Nov 02 2026 - 22:11:58 EST
Kim Wooseok <5mghybrid@xxxxxxxxx> wrote:
> From: Kim Wooseok <5mghybrid@xxxxxxxxx>
>
> An RTL8192EU failed to reconnect on a Raspberry Pi after an AP power
> cycle. RF_MODE contained a corrupted value, and restoring its initialized
> value restored reception.
>
> The register access helpers pass usb_buf directly to usb_control_msg(),
> but the buffer is embedded next to usb_buf_mutex. On the affected Pi,
> it shares a cache line with the mutex's waiter state. A contending task
> updates that state while the USB transfer uses the buffer. This violates
> the cache-line isolation required for non-coherent DMA.
>
> Allocate the buffer once in probe and reuse it, avoiding an allocation
> for every register access. Keep the existing register access helpers and
> mutex protection. Free the buffer on probe failure and after power_off()
> in disconnect, since shutdown still uses the register access helpers.
>
> Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Kim Wooseok <5mghybrid@xxxxxxxxx>
> Acked-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
f7c98e720cad wifi: rtl8xxxu: isolate the USB register buffer from CPU state
---
https://github.com/pkshih/rtw.git