From: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: "Li, Meng" <Meng.Li@windriver.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"usb-storage@lists.one-eyed-alien.net"
<usb-storage@lists.one-eyed-alien.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: storage: add shutdown function for usb storage driver
Date: Tue, 24 Oct 2023 17:45:40 +0200 [thread overview]
Message-ID: <2023102428-zit-quickness-9b73@gregkh> (raw)
In-Reply-To: <3fe5b43c-a5aa-4c6a-8614-03a4d9dd53e2@rowland.harvard.edu>
On Tue, Oct 24, 2023 at 11:35:19AM -0400, Alan Stern wrote:
> On Tue, Oct 24, 2023 at 03:43:56AM +0000, Li, Meng wrote:
> >
> >
> > > -----Original Message-----
> > > From: Alan Stern <stern@rowland.harvard.edu>
>
> > > On Mon, Oct 23, 2023 at 01:41:11PM +0800, Meng Li wrote:
> > > > On ls1043/ls1046 rdb platform, if a PCIe-USB host controller is
> > > > installed, and an USB disk is also installed on the PCIe card, when
> > > > executing "reboot -f" to reset the board, there will be below error reported:
> > > > usb 2-2: device not accepting address 2, error -108
>
> > > > This issue is introduced by linux-yocto commit 837547b64a34("driver: net:
> > > > dpaa: release resource when executing kexec") that cause to spend more
> > > > time on shutdown operation. So, the 2 platforms with DPAA are not
> > > > reset immediately after executing force reboot command. Moreover, the
> > > > usb-storage thread is still in active status, there is still control
> > > > data transferred between USB disk and PCIe host controller. But now
> > > > the shutdown callback of usb pci driver had been invoked to stop the
> > > > PCIe host controller completely. In this situation, the data transferring failed
> > > and report error.
> > >
> > > That's _supposed_ to happen. By design, the "reboot -f" command is meant
> > > to carry out an immediate reboot, without using the init system, unmounting
> > > filesystems, or doing other cleanup operations.
> > >
> >
> > As my above said, I understand what you mean. I also thought over what you said.
> > I am not sure, but I still sent patch to upstream community, and want to get some suggest from more authoritative maintainer.
> >
> > > If you want a clean reboot with no errors, don't use the "-f" option.
> > >
> >
> > There is also error report even if I use command "reboot"
>
> Okay, that's a different matter. In fact, I don't know what is supposed
> to happen during a clean reboot.
Define "clean" :)
reboot is a system thing that happens before the reboot syscall happens.
So which are we talking nabout here?
> Greg, do you know? Should we take the time to disconnect all the USB
> devices during a system shutdown?
In the past we have not. And if we switch to do so, we might get some
complaints as we would now delaying the shutdown process to be longer
than before.
> What happens with non-USB disk drives? Or other removable devices?
It would have to come from "above" in the device tree, so does the PCI
or platform bus say that they should be shut down and their child
devices?
thanks,
greg k-h
next prev parent reply other threads:[~2023-10-24 15:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 5:41 [PATCH] usb: storage: add shutdown function for usb storage driver Meng Li
2023-10-23 19:11 ` Alan Stern
2023-10-24 3:43 ` Li, Meng
2023-10-24 15:35 ` Alan Stern
2023-10-24 15:45 ` gregkh [this message]
2023-10-24 15:58 ` Alan Stern
2023-10-24 17:11 ` gregkh
2023-10-24 19:23 ` Alan Stern
2023-10-25 2:25 ` Li, Meng
2023-10-25 14:25 ` Alan Stern
2023-10-25 9:07 ` Oliver Neukum
2023-10-25 14:28 ` Alan Stern
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=2023102428-zit-quickness-9b73@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Meng.Li@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).