From: Oliver Neukum <oneukum@suse.com>
To: Jiayi Li <lijiayi@kylinos.cn>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Michal Pecio <michal.pecio@gmail.com>,
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] usb: uas: wait for pending commands before unbinding
Date: Thu, 22 Oct 2026 15:29:52 +0200 [thread overview]
Message-ID: <6015c40b-04ae-443e-8271-63e064f08ab0@suse.com> (raw)
In-Reply-To: <20261022123401.319479-1-lijiayi@kylinos.cn>
Hi,
thank you for doing this.
On 22.10.26 14:34, Jiayi Li wrote:
> +static void uas_pre_disconnect(struct usb_interface *intf)
> +{
> + struct Scsi_Host *shost = usb_get_intfdata(intf);
> + struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata;
> + unsigned long flags, start_time;
> +
> + spin_lock_irqsave(shost->host_lock, flags);
> + scsi_block_requests(shost);
No, on pure grounds of maintainability, please put the
blocking of the host in the direct handler for disconnect.
Unblocking in the caller something that was never blocked
would forever trip up anybody reading the code.
Regards
Oliver
prev parent reply other threads:[~2026-10-22 13:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 12:34 Jiayi Li
2026-10-22 13:05 ` Greg Kroah-Hartman
2026-10-22 13:29 ` Oliver Neukum [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=6015c40b-04ae-443e-8271-63e064f08ab0@suse.com \
--to=oneukum@suse.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=michal.pecio@gmail.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®