[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3fe5b43c-a5aa-4c6a-8614-03a4d9dd53e2@rowland.harvard.edu>
Date: Tue, 24 Oct 2023 11:35:19 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: "Li, Meng" <Meng.Li@...driver.com>
Cc: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"usb-storage@...ts.one-eyed-alien.net"
<usb-storage@...ts.one-eyed-alien.net>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: storage: add shutdown function for usb storage
driver
On Tue, Oct 24, 2023 at 03:43:56AM +0000, Li, Meng wrote:
>
>
> > -----Original Message-----
> > From: Alan Stern <stern@...land.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.
Greg, do you know? Should we take the time to disconnect all the USB
devices during a system shutdown? What happens with non-USB disk
drives? Or other removable devices?
Alan Stern
Powered by blists - more mailing lists