Hi Alan

> 
> 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 <ravib...@ti.com>
> > ---
> >  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?

In specific condition, where the transmit request is in progress and device is 
unplugged from host, found that this current tx request is not 
dequeued/unlinked during disconnect. 

Ravi 
> 
> Alan Stern
> 
> --
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to