RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-03 Thread Alan Stern
On Fri, 3 Aug 2012, B, Ravi wrote: > > Consider a disk drive with a large cache. When usb-storage > > unbinds from the device, the SCSI layer will want to tell the > > disk to write out its cache. Flushing the cache could take a > > while, so the SYNCHRONIZE CACHE command needs to have a long

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-03 Thread B, Ravi
> > On Fri, 3 Aug 2012, B, Ravi wrote: > > > Alan, I did not understand, if the driver has unbound from > the device, > > what is the need to wait for 30seconds timeout to cancel the URB. > > Can you explain in detail. > > Consider a disk drive with a large cache. When usb-storage > unbinds

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-03 Thread Alan Stern
On Fri, 3 Aug 2012, B, Ravi wrote: > Alan, I did not understand, if the driver has unbound from the > device, what is the need to wait for 30seconds timeout to cancel the > URB. > Can you explain in detail. Consider a disk drive with a large cache. When usb-storage unbinds from the device, the S

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-02 Thread B, Ravi
> -Original Message- > From: Alan Stern [mailto:st...@rowland.harvard.edu] > Sent: Friday, August 03, 2012 7:15 AM > To: B, Ravi > Cc: Matthew Dharm; Greg Kroah-Hartman; > linux-usb@vger.kernel.org; usb-stor...@lists.one-eyed-alien.net > Subject: RE: [PATCH] u

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-02 Thread Alan Stern
On Fri, 3 Aug 2012, B, Ravi wrote: > > > What host controller driver are you using? > > It is mentor controller integrated with CPPI41-DMA Then you're using the musb driver? > > > Why doesn't the controller hardware detect that the device fails to > > > send handshake packets and abort the tr

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-02 Thread B, Ravi
Hi Thanks for the quick response. > > > > > Alan you may be correct. Let me explain, the issue occurs while > > > unplugging the device during Tx transfer, > > > 1) During Tx transfer, TX-DMA is programmed to transfer the data. > > > 2) The TX-DMA completes the transfer and generates > compl

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-02 Thread Alan Stern
On Thu, 2 Aug 2012, Alan Stern wrote: > On Thu, 2 Aug 2012, B, Ravi wrote: > > > Alan you may be correct. Let me explain, the issue occurs while > > unplugging the device during Tx transfer, > > 1) During Tx transfer, TX-DMA is programmed to transfer the data. > > 2) The TX-DMA completes the tr

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-02 Thread Alan Stern
On Thu, 2 Aug 2012, B, Ravi wrote: > Alan you may be correct. Let me explain, the issue occurs while > unplugging the device during Tx transfer, > 1) During Tx transfer, TX-DMA is programmed to transfer the data. > 2) The TX-DMA completes the transfer and generates completion interrupt. > 3) On

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-02 Thread B, Ravi
Hi > On Thu, 2 Aug 2012, B, Ravi wrote: > > > > > --- 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_FLID

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-02 Thread Alan Stern
On Thu, 2 Aug 2012, B, Ravi wrote: > > > --- 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); > > > + /

RE: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-02 Thread B, Ravi
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 nev

Re: [PATCH] usb: storage: stop all current urbs when device is disconnected

2012-08-01 Thread Alan Stern
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 s