RE: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-15 Thread Kento.A.Kobayashi
Hi, >On Mon, 15 Apr 2019, Alan Stern wrote: > >> On Mon, 15 Apr 2019 kento.a.kobaya...@sony.com wrote: >> >> > Hi >> > >> > >The unbind happens from inside the SCSI EH callback. If that really is >> > >not allowed, we'll need to change it. Or we can just change it >> > >regardless, since the

RE: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-15 Thread Alan Stern
On Mon, 15 Apr 2019, Alan Stern wrote: > On Mon, 15 Apr 2019 kento.a.kobaya...@sony.com wrote: > > > Hi > > > > >The unbind happens from inside the SCSI EH callback. If that really is > > >not allowed, we'll need to change it. Or we can just change it > > >regardless, since the effort requir

RE: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-15 Thread Alan Stern
On Mon, 15 Apr 2019 kento.a.kobaya...@sony.com wrote: > Hi > > >The unbind happens from inside the SCSI EH callback. If that really is not > >allowed, we'll need to change it. Or we can just change it regardless, > >since the effort required is pretty small. > > > >Kento, please try the patch

RE: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-14 Thread Kento.A.Kobayashi
Hi >The unbind happens from inside the SCSI EH callback. If that really is not >allowed, we'll need to change it. Or we can just change it regardless, since >the effort required is pretty small. > >Kento, please try the patch below. Does it help with your problem? Thank you for suggestion ab

Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-09 Thread Martin K. Petersen
Bart, > From which context does that unbind happen? From inside a SCSI EH > callback or from the context of a workqueue? I think the former is not > allowed but that the latter is allowed. The SRP initiator driver > (ib_srp.c) follows the latter approach. Yeah. It's better to punt the actual te

Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-09 Thread Alan Stern
On Tue, 9 Apr 2019, Bart Van Assche wrote: > On Tue, 2019-04-09 at 10:44 -0400, Alan Stern wrote: > +AD4 On Mon, 8 Apr 2019, Martin K. Petersen wrote: > +AD4 > +AD4 +AD4 > +AD4 +AD4 Alan, > +AD4 +AD4 > +AD4 +AD4 +AD4 So it looks as though the SCSI subsystem doesn't like to have > a reset > +A

Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-09 Thread Bart Van Assche
On Tue, 2019-04-09 at 10:44 -0400, Alan Stern wrote: > On Mon, 8 Apr 2019, Martin K. Petersen wrote: > > > > > Alan, > > > > > So it looks as though the SCSI subsystem doesn't like to have a reset > > > handler call scsi_remove_host. > > > > Are you talking about a PCI device removal handler o

Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-09 Thread Alan Stern
On Mon, 8 Apr 2019, Martin K. Petersen wrote: > > Alan, > > > So it looks as though the SCSI subsystem doesn't like to have a reset > > handler call scsi_remove_host. > > Are you talking about a PCI device removal handler or a SCSI error > handler? The context of this discussion is a USB mass

Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-08 Thread Martin K. Petersen
Alan, > So it looks as though the SCSI subsystem doesn't like to have a reset > handler call scsi_remove_host. Are you talking about a PCI device removal handler or a SCSI error handler? > Commands dispatched by the removal routines are forced to wait for the > reset recovery to finish, which

RE: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-08 Thread Alan Stern
On Tue, 9 Apr 2019 kento.a.kobaya...@sony.com wrote: > Hi, > > >So it looks as though the SCSI subsystem doesn't like to have a reset > >handler call scsi_remove_host. Commands dispatched by the removal routines > >are forced to wait for the reset recovery to finish, which won't happen > >unt

RE: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-08 Thread Kento.A.Kobayashi
Hi, >So it looks as though the SCSI subsystem doesn't like to have a reset handler >call scsi_remove_host. Commands dispatched by the removal routines are forced >to wait for the reset recovery to finish, which won't happen until those >commands have been completed. You mean reset handeler sh

RE: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-04-04 Thread Alan Stern
On Thu, 4 Apr 2019 kento.a.kobaya...@sony.com wrote: > Hi, > > >> Root Cause > >> - Block layer timeout happens after power off UAS USB device which is > >> accessed as reproduce step. During timeout error handler process, scsi > >> host state becomes SHOST_CANCEL_RECOVERY that causes IO hangs

Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-03-08 Thread Alan Stern
On Fri, 8 Mar 2019, Oliver Neukum wrote: > On Fr, 2019-03-08 at 09:13 +, kento.a.kobaya...@sony.com wrote: > > The usb_reset_and_verify_device included in usb_reset_device fails > > with -ENODEV after power off hub port, and the -ENODEV error will > > be reported to uas_eh_bus_reset_handler an

Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-03-08 Thread Oliver Neukum
On Fr, 2019-03-08 at 09:13 +, kento.a.kobaya...@sony.com wrote: > The usb_reset_and_verify_device included in usb_reset_device fails > with -ENODEV after power off hub port, and the -ENODEV error will > be reported to uas_eh_bus_reset_handler and upper layer, so it > doesn't need to do rebind i

RE: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-03-03 Thread Jacky.Cao
edu; linux-...@vger.kernel.org; linux-scsi@vger.kernel.org; usb-stor...@lists.one-eyed-alien.net; linux-ker...@vger.kernel.org Subject: Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port On Mon, Mar 04, 2019 at 02:08:54AM +, jacky@sony.com wrote: >

Re: [PATCH] usb: uas: fix usb subsystem hang after power off hub port

2019-03-03 Thread Greg KH
On Mon, Mar 04, 2019 at 02:08:54AM +, jacky@sony.com wrote: > > > This email is confidential and intended only for the use of the individual or > entity named above and may contain information that is privileged. If you are > not the intended recipient, y