From: Abdurrahman Karadag <abdurrahmankaradag19@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: pkshih@realtek.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH rtw-next v2] wifi: rtw88: pci: wake the TX queues when the rings are reset
Date: Wed, 14 Oct 2026 01:08:39 +0300 [thread overview]
Message-ID: <20261013220839.39149-1-abdurrahmankaradag19@gmail.com> (raw)
In-Reply-To: <02b86ed0d0814f009cb5ca83bae343c7@realtek.com>
> I'm thinking if here is too early to wake up queues. Should we do this in
> rtw_reconfig_complete()?
It is too early, and rtw_reconfig_complete() is the right place. v3 does
that.
On the reset path rtw_core_stop() has already cleared RTW_FLAG_RUNNING by
the time rtw_pci_reset_trx_ring() runs, so anything mac80211 hands the
driver between that wake and the end of the restart is freed again by
rtw_ops_tx(). reconfig_complete() is called from the wake_up label in
ieee80211_reconfig(), where the comment reads "If this is for hw restart
things are still running". It also makes the fix bus-independent instead
of PCI-only.
I measured it at the new hook before sending, with two builds of current
rtw-next that differ by nothing but this patch, using mac80211's own
tracepoints instead of a register read. Under load the BE queue is
stopped by the ring-full path, then rtw_fw_recovery() is called:
without the patch
511.499278 stop_queue queue:2 reason:0 DRIVER, left dangling
511.501625 stop_queue queue:0-3 reason:4 SUSPEND, the restart
511.957404 drv_reconfig_complete reconfig_type:0
511.957411 wake_queue queue:0-3 reason:4 only SUSPEND is woken
AC_BE stays 0x00000001, 100% loss
with the patch
475.930915 drv_reconfig_complete reconfig_type:0
475.930925 wake_queue queue:2 reason:0 10 us later
475.930926 wake_queue queue:0-3 reason:4
AC_BE reads 0x00000000, 0% loss
So the wake lands after the restart has completed and before mac80211
wakes the SUSPEND reason itself. No TXPAUSE write and no injection this
time - the ring fills on its own under load, which is also why I am happy
to leave the measurement out of the commit message.
One consequence I should flag, since v2 covered it and v3 does not. A
plain "ip link set wlan0 down/up" also reaches rtw_pci_reset_trx_ring(),
and mac80211 never clears a DRIVER stop on interface down - nothing
outside the stop/wake helpers touches local->q_stop_reasons[]. So with v3
a queue stopped before a down/up stays stopped. Is the restart case the
one you want fixed, or should a down/up release it too?
I also left ring->queue_stopped alone. It stays set until the first
completion after the restart, which clears it, and rtw_pci_tx_write()
does not read it before stopping a queue, so a stale value costs nothing.
I can clear it in rtw_pci_reset_trx_ring() if you would rather the driver
state did not claim a stop that is gone.
> As I see, the commit message can be very simple -- wake up queues for
> ieee80211_restart_hw() case.
Done, and the subject names it now. The measurement paragraph is out -
you are right that the stall belongs elsewhere.
next prev parent reply other threads:[~2026-10-13 22:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-10 19:31 Abdurrahman Karadag
2026-10-12 6:57 ` Ping-Ke Shih
2026-10-13 22:08 ` Abdurrahman Karadag [this message]
2026-10-14 1:52 ` Ping-Ke Shih
2026-10-16 22:47 ` Abdurrahman Karadag
2026-10-19 1:25 ` Ping-Ke Shih
2026-10-21 10:13 ` Abdurrahman Karadag
2026-10-22 3:49 ` Ping-Ke Shih
2026-10-23 11:18 ` 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=20261013220839.39149-1-abdurrahmankaradag19@gmail.com \
--to=abdurrahmankaradag19@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.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®