RE: [PATCH rtw-next v4 3/3] wifi: rtl8xxxu: preserve RX requests across recoverable transfer errors
From: Ping-Ke Shih
Date: Mon Sep 21 2026 - 22:56:22 EST
Kim Wooseok via B4 Relay <devnull+5mghybrid.khu.ac.kr@xxxxxxxxxx> wrote:
> From: Kim Wooseok <5mghybrid@xxxxxxxxx>
>
> rtl8xxxu resubmits completed RX requests when more than eight URBs are
> waiting on the pending list. It starts with 32 URBs, but frees them on
> completion errors. After enough errors, the remaining pool can no longer
> reach the submission threshold. Reception then stays stopped even after
> the errors end. Temporary submission failures can leave a small batch
> waiting with no further work scheduled, too.
>
> Keep the URB when a completion reports EPROTO, EILSEQ, ETIME, EOVERFLOW,
> ECOMM or ENOSR. Free its receive buffer and return the request to the
> same pending list used by normal completions. ENOMEM/EAGAIN from startup
> or worker submission uses this path as well, so a submission failure
> cannot strand a request during recovery.
>
> Use one delayed work item to submit the pending requests. An error
> queues a retry after 100 ms without moving an existing reservation back.
> If a normal completion takes the pending count above eight,
> mod_delayed_work(..., 0) brings the work forward. This limits repeated
> retries when reception is not progressing, while allowing normal traffic
> to replenish the pool promptly. The 100 ms delay is therefore not a
> minimum wait for each failed URB.
>
> Keep the shutdown check, queue insertion and scheduling under the RX
> lock. Stop sets shutdown under that lock, cancels the delayed work
> synchronously, then drains active and pending requests. Cancellation and
> device removal continue to free their URBs.
>
> Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)")
> Assisted-by: GPT-6 Astra
> Signed-off-by: Kim Wooseok <5mghybrid@xxxxxxxxx>
Reviewed-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>