From: Abdurrahman Karadag <abdurrahmankaradag19@gmail.com>
To: pkshih@realtek.com
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
rtl8821cerfe2@gmail.com,
abkarada <abdurrahmankaradag19@gmail.com>
Subject: [PATCH rtw-next 0/2] rtw88: recover a stopped TX queue, and notice a stalled ring
Date: Sat, 3 Oct 2026 02:10:11 +0300 [thread overview]
Message-ID: <20261002231013.11792-1-abdurrahmankaradag19@gmail.com> (raw)
From: abkarada <abdurrahmankaradag19@gmail.com>
These come out of a long thread about an RTL8821CE whose TX dies while
the link stays associated:
https://lore.kernel.org/linux-wireless/20260826162514.80580-1-abdurrahmankaradag19@gmail.com/
Ping-Ke asked whether triggering the driver's recovery resolves the
stuck ring. Trying to answer that turned up patch 1, which is a real
bug and independent of whatever makes the hardware stop in the first
place.
Patch 1: for a queue stopped by the PCI TX ring-full path, the flag and
the stop reason are released only from the completion loop in
rtw_pci_tx_isr(). Resetting the rings drops the pending descriptors and
frees their skbs directly, so that loop never runs for them, and the
stop survives over an empty ring that will never complete anything
again. ieee80211_restart_hw() therefore cannot recover a device that
had stopped a queue - which is precisely when you would want it to. The
patch records the queue mappings that path stops and releases them both
from the completion loop and when the reset empties the ring.
I can produce that state on demand by pausing TX in hardware, which
freezes the read index while the driver keeps submitting, the same
shape the chip shows when it wedges by itself. Same script both ways,
only the patch differs:
without patch with patch
BE queue stopped after 1 s 1 s
doorbell rewrite no effect no effect
rtw_fw_recovery() ran ran
BE stop reason afterwards 0x1 0x0
traffic none in 90 s back within 2 s
In the failing run the station reassociated twice inside those 90 s, so
the link was up; only the queue was still stopped.
Patch 2 is diagnostic and unrelated to the above: there is currently no
sign anywhere when a TX ring stops advancing. I have five captures
where the hardware read index is frozen while the write index runs on,
with power save off and REG_TXPAUSE at 0x00, and in four of them the
ring had not even filled yet - traffic was simply gone, with nothing in
the log. This warns once per episode. Checked silent across 180 s of
saturated TX, about 600 MB.
Patch 2 is the detection half of a patch I sent and withdrew in
September; its recovery was a doorbell rewrite, which I measured as
ineffective and which is gone.
Both build clean with W=1 and pass checkpatch --strict.
Abdurrahman Karadag (2):
wifi: rtw88: pci: wake the TX queues when the rings are reset
wifi: rtw88: pci: warn when a TX ring stops advancing
drivers/net/wireless/realtek/rtw88/hci.h | 7 ++
drivers/net/wireless/realtek/rtw88/main.c | 2 +
drivers/net/wireless/realtek/rtw88/pci.c | 128 ++++++++++++++++++++--
drivers/net/wireless/realtek/rtw88/pci.h | 4 +
4 files changed, 134 insertions(+), 7 deletions(-)
base-commit: 7cde94dab0e74434ccc0a387d7ad373fb3becda0
--
2.55.0
next reply other threads:[~2026-10-02 23:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-02 23:10 Abdurrahman Karadag [this message]
2026-10-02 23:10 ` [PATCH rtw-next 1/2] wifi: rtw88: pci: wake the TX queues when the rings are reset Abdurrahman Karadag
2026-10-02 23:10 ` [PATCH rtw-next 2/2] wifi: rtw88: pci: warn when a TX ring stops advancing Abdurrahman Karadag
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261002231013.11792-1-abdurrahmankaradag19@gmail.com \
--to=abdurrahmankaradag19@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=rtl8821cerfe2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®