[PATCH RESEND wireless 0/4] wifi: rtl8xxxu: keep RX requests available across transient errors
From: kimwooseok <hidden>
Date: 2026-09-12 22:09:11
Also in:
lkml
This resends the same patches after line wrapping damaged the previous posting and prevented it from being applied. There are no code changes. Previous posting: https://lore.kernel.org/linux-wireless/CAH1Bc_wBUmmNyzF3c2H1aFBRBbAPSw0hR=1MnPOAcCXypVL_Dg@mail.gmail.com/ (local) rtl8xxxu maintains a pool of 32 RX URBs. Successful completions return their URBs to a pending list and schedule the RX worker when more than eight URBs are waiting. The worker allocates fresh receive buffers and resubmits the queued URBs in a batch. Completion errors free the affected URBs, reducing the pool. Once eight or fewer survive, their completions can leave all remaining requests on the pending list without reaching the worker scheduling threshold. If no request is in flight and no worker is pending or running, nothing triggers further submissions, so RX remains stalled after the errors stop. Temporary submission failures can leave requests in the same state, while retaining an skb that the next submission attempt overwrites. This series fixes buffer ownership on failed submission, unwinds incomplete startup, and preserves requests through one delayed retry path. The retry worker schedules submission even for a single request. A separate error list provides a 100 ms batch delay from the first error while preserving normal successful RX batching. Shutdown drains retry work, submission work and active requests in that order. Completion retries cover EPROTO, EILSEQ, ETIME, EOVERFLOW, ECOMM and ENOSR; ENOMEM/EAGAIN from startup or worker submission uses the same retry path. Cancellation and removal keep their release behavior. EPIPE endpoint-halt recovery is outside this series. With 24 injected EPROTO completions, the original driver stopped at eight pending requests and zero in flight for about 30 seconds. Under the same error budget, the patched driver retained all 32 requests and resumed RX without restarting the interface. Validation: - ARM64 QEMU KUnit: 11/11 cases passed, covering the actual RX helpers, worker, buffer ownership, startup failures and shutdown. - RTL8192EU on Raspberry Pi, kernel 6.18.46-thesis-test-rt+: 13/13 cases passed using a compatibility backport. The lab fixture substitutes completion statuses and injects submission and allocation failures. Each of the six completion statuses recovered after 32 completion errors followed by 96 submission failures. Error-window, pending-retry stop, startup failure and clean RX/down-up cases also passed. - W=1 ARM64 allmodconfig and allyesconfig builds passed with incremental caches; the changed driver and KUnit objects rebuilt in both. Sparse added no diagnostics relative to baseline. - Each intermediate production commit compiled, and sequential patch application reproduced the corresponding source trees. kimwooseok (4): wifi: rtl8xxxu: free RX skb when URB submission fails wifi: rtl8xxxu: unwind incomplete receive startup wifi: rtl8xxxu: preserve RX requests across recoverable transfer errors wifi: rtl8xxxu: test RX ownership and recovery across failures .../wireless/realtek/rtl8xxxu/.kunitconfig | 16 + drivers/net/wireless/realtek/rtl8xxxu/Kconfig | 11 + .../net/wireless/realtek/rtl8xxxu/Makefile | 3 + drivers/net/wireless/realtek/rtl8xxxu/core.c | 236 +++++++-- .../net/wireless/realtek/rtl8xxxu/rtl8xxxu.h | 3 + .../net/wireless/realtek/rtl8xxxu/rx-test.c | 461 ++++++++++++++++++ .../net/wireless/realtek/rtl8xxxu/rx-test.h | 27 + 7 files changed, 707 insertions(+), 50 deletions(-) create mode 100644 drivers/net/wireless/realtek/rtl8xxxu/.kunitconfig create mode 100644 drivers/net/wireless/realtek/rtl8xxxu/rx-test.c create mode 100644 drivers/net/wireless/realtek/rtl8xxxu/rx-test.h base-commit: f71dd599a98182d6bc34dce39977f928068ecd64 -- 2.48.1