From: Michal Pecio <michal.pecio@gmail.com>
To: Oliver Neukum <oneukum@suse.com>
Cc: Jiayi Li <lijiayi@kylinos.cn>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org,
usb-storage@lists.one-eyed-alien.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: uas: quiesce SCSI before stopping endpoints on unbind
Date: Fri, 2 Oct 2026 14:51:12 +0200 [thread overview]
Message-ID: <20261002145112.3ee2b500.michal.pecio@gmail.com> (raw)
In-Reply-To: <813dcf3a-0615-4152-baa7-47b0046ca113@suse.com>
On Wed, 30 Sep 2026 09:22:49 +0200, Oliver Neukum wrote:
> > When URB submission or completion returns -ENODEV or -ESHUTDOWN,
> > it marks the transport dead, stops further submissions, clears
>
> Why this specific trigger?
> I am asking because -ENODEV comes relatively late in the process.
> URBs tend to fail long before that.
But it's sufficient, right? Apparently all we need is to detect
USB disconnection before disconnect() runs. This will do.
You may see -EPROTO earlier, but that's indistinguishable from
transient erros. -ENODEV specifically means "device is gone" and
-ESHUTDOWN is usb_disable_endpoint() etc or a fatal HC error.
These statuses should probably result in the SCSI command being
completed with error status right away so that scsi_remove_host()
called by disconnect() has nothing to wait for. Note that new
commands will be failing to queue due to usb_submit_urb() errors.
But UAS driver infamously has no URB error handling; if anything
goes wrong it just waits for SCSI core to abort the command. Not
sure why things are this way.
Regards,
Michal
next prev parent reply other threads:[~2026-10-02 12:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 3:11 Jiayi Li
2026-09-22 8:34 ` Oliver Neukum
2026-09-30 1:33 ` Jiayi Li
2026-09-30 7:22 ` Oliver Neukum
2026-10-02 12:51 ` Michal Pecio [this message]
[not found] <20260922032156.E6AC01F000FF@smtp.kernel.org>
2026-09-22 10:05 ` Jiayi Li
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=20261002145112.3ee2b500.michal.pecio@gmail.com \
--to=michal.pecio@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=lijiayi@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=stern@rowland.harvard.edu \
--cc=usb-storage@lists.one-eyed-alien.net \
/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®