From: Greg KH <gregkh@linuxfoundation.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Zenm Chen <zenmchen@gmail.com>,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
pkshih@realtek.com, rtl8821cerfe2@gmail.com,
stable@vger.kernel.org, usb-storage@lists.one-eyed-alien.net,
usbwifi2024@gmail.com
Subject: Re: [usb-storage] Re: [PATCH] USB: storage: Ignore driver CD mode for Realtek multi-mode Wi-Fi dongles
Date: Thu, 14 Aug 2025 19:06:41 +0200 [thread overview]
Message-ID: <2025081428-unfold-shakily-6278@gregkh> (raw)
In-Reply-To: <b938a764-6ded-4b76-a15c-82c0062abf42@rowland.harvard.edu>
On Thu, Aug 14, 2025 at 12:21:16PM -0400, Alan Stern wrote:
> On Thu, Aug 14, 2025 at 10:03:29PM +0800, Zenm Chen wrote:
> > > Also, can you collect a usbmon trace showing what happens when the dongle is plugged in?
> >
> > Hi Alan,
> >
> > Today I removed usb_modeswitch from my system and grabbed some data, could you please take
> > a look what was wrong? many thanks!
>
> Yes, this shows the problem. I'll skip the unimportant stuff below.
>
> > D-Link AX9U
>
> ...
>
> > ffff8ae1f0bee000 771359614 S Bo:2:053:5 -115 31 = 55534243 0a000000 08000000 80000a25 00000000 00000000 00000000 000000
> > ffff8ae1f0bee000 771359684 C Bo:2:053:5 0 31 >
> > ffff8ae1b52d83c0 771359702 S Bi:2:053:4 -115 8 <
> > ffff8ae1b52d83c0 771359812 C Bi:2:053:4 0 8 = 00007bff 00000200
> > ffff8ae1f0bee000 771359853 S Bi:2:053:4 -115 13 <
> > ffff8ae1f0bee000 771359935 C Bi:2:053:4 0 13 = 55534253 0a000000 00000000 00
>
> This is a READ CAPACITY(10) command. It asks the device for the number
> of data blocks it contains and the size of each block. The reply says
> there are 31744 blocks each containing 512 bytes (which is unheard-of
> for CDs; they virtually always have 2048 bytes per block).
>
> ...
>
> > ffff8ae1f0bee000 771366235 S Bo:2:053:5 -115 31 = 55534243 17000000 0c000000 00000615 1000000c 00000000 00000000 000000
> > ffff8ae1f0bee000 771366306 C Bo:2:053:5 0 31 >
> > ffff8ae218ff2900 771366317 S Bo:2:053:5 -115 12 = 00000008 00000000 00000800
> > ffff8ae218ff2900 771366432 C Bo:2:053:5 0 12 >
> > ffff8ae1f0bee000 771366443 S Bi:2:053:4 -115 13 <
> > ffff8ae1f0bee000 771366556 C Bi:2:053:4 0 13 = 55534253 17000000 0c000000 01
>
> This is a MODE SELECT(6) command. This one tells the device to change
> the block size to 2048. The device responds with an error indication.
>
> > ffff8ae1f0bee000 771366567 S Bo:2:053:5 -115 31 = 55534243 18000000 12000000 80000603 00000012 00000000 00000000 000000
> > ffff8ae1f0bee000 801899370 C Bo:2:053:5 -104 0
>
> This is a REQUEST SENSE command; it asks the device to report the
> details of the error condition from the previous command. But the
> device doesn't reply and the command times out. From this point on,
> the trace shows nothing but repeated resets. They don't help and the
> device appears to be dead.
>
> I don't know of any reasonable way to tell the kernel not to send that
> MODE SELECT(6) command.
>
> The log for the Mercury is generally similar although the details are
> different. Everything works okay until the computer sends a command
> that the device doesn't like. At that point the device dies and
> resets don't revive it.
>
> So it does indeed look like there is no alternative to making
> usb-storage ignore the devices.
>
> Greg, do you still have the original patch email that started this
> thread? You can add:
>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
Thanks, I have it somewhere, I'll dig it up and apply it.
greg k-h
next prev parent reply other threads:[~2025-08-14 17:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 16:24 [PATCH] USB: storage: Ignore driver CD mode for Realtek multi-mode Wi-Fi dongles Zenm Chen
2025-08-13 16:58 ` Alan Stern
2025-08-13 17:53 ` Zenm Chen
[not found] ` <8560A878-1EAE-4FE3-B96E-2916E27F90F5@gmail.com>
2025-08-13 18:13 ` Giorgi
2025-08-13 23:32 ` Zenm Chen
2025-08-13 18:19 ` [usb-storage] " Alan Stern
2025-08-13 22:54 ` Zenm Chen
2025-08-14 1:57 ` Lars Melin
2025-08-14 14:31 ` Zenm Chen
2025-08-14 14:59 ` Zenm Chen
2025-08-14 14:03 ` Zenm Chen
2025-08-14 16:21 ` [usb-storage] " Alan Stern
2025-08-14 17:06 ` Greg KH [this message]
2025-08-14 17:22 ` Zenm Chen
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=2025081428-unfold-shakily-6278@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=rtl8821cerfe2@gmail.com \
--cc=stable@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=usb-storage@lists.one-eyed-alien.net \
--cc=usbwifi2024@gmail.com \
--cc=zenmchen@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