|
|
|
Re: [PATCH] usb: storage: stop all current urbs when device is disconnected | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
On Wed, 1 Aug 2012, Ravi Babu wrote: > When the scsi mass storage device is disconnected, the current urbs > queued to hcd driver must be cancelled, otherwise the current urbs > are pending at hcd driver and the active urb programmed at host > controller will never be completed. The class driver shall dequeue > or cancel all the urb request submitted to hcd once the device is > disconnected and no longer exits. > > Signed-off-by: Ravi Babu <ravibabu@xxxxxx> > --- > drivers/usb/storage/usb.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c > index e23c30a..a313af6 100644 > --- a/drivers/usb/storage/usb.c > +++ b/drivers/usb/storage/usb.c > @@ -844,6 +844,8 @@ static void quiesce_and_remove_host(struct us_data *us) > */ > scsi_lock(host); > set_bit(US_FLIDX_DISCONNECTING, &us->dflags); > + /* stop the current urbs when the device got disconnected */ > + usb_stor_stop_transport(us); This shouldn't be necessary. This code runs after scsi_remove_host() returns, so there should not be any URBs running at this point. Have you actually encountered a problem that this patch fixes? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html

[Linux Media] [Video for Linux] [Linux Input] [Linux Audio Users] [Photo] [Yosemite News] [Yosemite Photos] [Free Online Dating] [Linux Kernel] [Linux SCSI] [Old Linux USB Devel Archive] [More Archives]
![]() |
![]() |