linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: rcfa <kernel@cubiculum.net>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Bitterblue Smith <rtl8821cerfe2@gmail.com>
Subject: RE: [PATCH rtw-next] wifi: rtw89: usb: keep the endpoints until the driver lets go on unbind
Date: Wed, 11 Nov 2026 03:04:58 +0000	[thread overview]
Message-ID: <d8cde7d5d5174e6a8b6ccf2edb65faeb@realtek.com> (raw)
In-Reply-To: <20261107230547.3673679-1-kernel@cubiculum.net>

rcfa <kernel@cubiculum.net> wrote:
> When the driver is unbound from a device that is still attached (rmmod,
> or an unbind through sysfs), usbcore disables the interface's endpoints
> and kills their URBs before it calls the disconnect method, unless the
> driver sets soft_unbind. rtw89_core_unregister() then still
> deauthenticates, flushes the queues and stops the chip, but the bulk
> endpoints that carry H2C and C2H are already gone. On an RTL8922AU with
> an association, every unload logged:
> 
>   c2h reg timeout
>   timed out to flush queues    (3 times)
>   read HWSI is busy            (18 times)

Is this because sending deauth frames? 

> 
> Set soft_unbind for the USB drivers, and in rtw89_usb_disconnect()
> unregister before cancelling the RX and TX URBs while the device is
> still attached. After an unplug the device is gone, so the order stays
> as it was; usbcore disables the endpoints first in that case (state
> NOTATTACHED) whether soft_unbind is set or not.

With soft_unbind=1, is it enough? Can we just one calling odrer?

> 
> Tested on an RTL8922AU (a USB 2 adapter) with the out-of-tree copy of
> this driver (morrownr/rtw89, which carries rtw-next as of 2026-11-05),
> kernels 7.1.5 and 7.2.15. Every unload while associated now logs only
> the deauthentication and "deregistering interface driver", with no
> warnings. A physical unplug while associated logs what it logged before
> (the messages above), with no warnings and nothing stuck. Reordering
> rtw89_usb_disconnect() without soft_unbind changed nothing. The other
> USB chips share rtw89_usb_disconnect() but were not tested.

Only need " Tested on an RTL8922AU (a USB 2 adapter)". Putting others
after your s-o-b with "---" delimiter. 

> 
> The problem was found with Claude Code (Claude Opus 5.5) while testing
> the driver, and this change and changelog were written in the same
> session.

To disclose LLM use, put this in additional note area. 

> 
> Fixes: 2135c28be6a8 ("wifi: rtw89: Add usb.{c,h}")

I don't think it touch chips, and it isn't not a severe problem.

> Signed-off-by: rcfa <kernel@cubiculum.net>

Please use your real name.

---
(Put additional note/comment here)

> ---
>  drivers/net/wireless/realtek/rtw89/rtw8851bu.c |  1 +
>  drivers/net/wireless/realtek/rtw89/rtw8852au.c |  1 +
>  drivers/net/wireless/realtek/rtw89/rtw8852bu.c |  1 +
>  drivers/net/wireless/realtek/rtw89/rtw8852cu.c |  1 +
>  drivers/net/wireless/realtek/rtw89/rtw8922au.c |  1 +
>  drivers/net/wireless/realtek/rtw89/usb.c       | 17 ++++++++++++++---
>  6 files changed, 19 insertions(+), 3 deletions(-)
> 



      reply	other threads:[~2026-11-11  3:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-07 23:05 [PATCH rtw-next] wifi: rtw89: usb: keep the endpoints until the driver lets go on unbind rcfa
2026-11-11  3:04 ` Ping-Ke Shih [this message]

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=d8cde7d5d5174e6a8b6ccf2edb65faeb@realtek.com \
    --to=pkshih@realtek.com \
    --cc=kernel@cubiculum.net \
    --cc=linux-wireless@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).