mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH rtw-next v4 0/3] wifi: rtl8xxxu: keep RX requests available across transient errors
@ 2026-09-21  7:59 Kim Wooseok via B4 Relay
  2026-09-21  7:59 ` [PATCH rtw-next v4 1/3] wifi: rtl8xxxu: free RX skb when URB submission fails Kim Wooseok via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Kim Wooseok via B4 Relay @ 2026-09-21  7:59 UTC (permalink / raw)
  To: linux-wireless
  Cc: Ping-Ke Shih, Jes Sorensen, Kalle Valo, linux-kernel, Kim Wooseok

rtl8xxxu keeps 32 RX URBs in circulation. Completed requests wait on a
pending list until more than eight are ready for resubmission. Completion
errors free their URBs, so a finite run of errors can leave too few
requests to reach that threshold. Reception can then remain stopped
after the errors end.

This series preserves those requests across recoverable errors. It also
fixes an skb leak after failed submission and startup error paths that
leave requests active or report success after only part of the pool was
allocated.

Normal completions and recoverable failures use one pending list and
one delayed work item. Errors schedule a retry with a 100 ms delay.
When a normal completion takes the pending count above eight,
mod_delayed_work(..., 0) brings the work forward. The delay limits
repeated retries when normal reception is not progressing; it is not a
minimum wait for each URB. ENOMEM/EAGAIN during submission uses the same
retry path.

I designed the v3 tests around the error paths changed by this series
and exercised them on an RTL8192EU with the RX changes backported to the
Pi's 6.18.46 RT kernel. I checked resource cleanup and reception after
recovery and restart.

With the same 24 injected EPROTO completions, the unpatched driver
stopped with eight pending URBs and none in flight. V3 retained all 32
and received 1,225 packets in 30 seconds without restarting the
interface.

For the changes in v4, I rebuilt the driver with W=1 after patches 2
and 3 using the existing ARM64 build configuration. Both builds passed
without warnings. All three patches pass strict checkpatch and apply
in order to the base commit.

Assisted-by: GPT-6 Astra
Signed-off-by: Kim Wooseok <5mghybrid@khu.ac.kr>

---
Changes in v4:
- Leave patch 1 unchanged and add Ping-Ke's Reviewed-by to patch 2.
- Initialize the RX worker's priv pointer at declaration and add the
  requested blank lines.
- Rename the queue helper's retry argument to defer_schedule.
- Use schedule_delayed_work() for delayed retries. Keep
  mod_delayed_work() to advance pending work on normal completions,
  using system_percpu_wq instead of system_wq.
- Link to v3: https://lore.kernel.org/linux-wireless/20260920-codex-rtl-rx-v3-submit-v3-0-883d11351963@khu.ac.kr/

---
Kim Wooseok (3):
      wifi: rtl8xxxu: free RX skb when URB submission fails
      wifi: rtl8xxxu: unwind incomplete receive startup
      wifi: rtl8xxxu: preserve RX requests across recoverable transfer errors

 drivers/net/wireless/realtek/rtl8xxxu/core.c     | 154 +++++++++++++----------
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h |   2 +-
 2 files changed, 87 insertions(+), 69 deletions(-)
---
base-commit: 73e3b1c94c7d5b4a113e7cbb42665dc2fe3b9d78
change-id: 20260920-codex-rtl-rx-v3-submit-1b4ea6921111

Best regards,
--  
Kim Wooseok <5mghybrid@khu.ac.kr>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-23  2:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21  7:59 [PATCH rtw-next v4 0/3] wifi: rtl8xxxu: keep RX requests available across transient errors Kim Wooseok via B4 Relay
2026-09-21  7:59 ` [PATCH rtw-next v4 1/3] wifi: rtl8xxxu: free RX skb when URB submission fails Kim Wooseok via B4 Relay
2026-09-23  2:26   ` Ping-Ke Shih
2026-09-21  7:59 ` [PATCH rtw-next v4 2/3] wifi: rtl8xxxu: unwind incomplete receive startup Kim Wooseok via B4 Relay
2026-09-21  7:59 ` [PATCH rtw-next v4 3/3] wifi: rtl8xxxu: preserve RX requests across recoverable transfer errors Kim Wooseok via B4 Relay
2026-09-22  2:54   ` Ping-Ke Shih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®