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 > > timeout. Otherwise the contents of the cache could get lost. > > > > Alan, what is meant by usb-stroage unbinds from the device? when the > usb-storage unbinds from device, is it not when the device got > disconnected? Or device gets umounted ? Unbind is not related to unmount. The driver is unbound from the device when the kernel tells the driver to stop controlling the device. This will happen when the device is unplugged, of course. But it also happens if you do "rmmod usb-storage" or if you write to the /sys/bus/usb/drivers/usb_storage/unbind file. > > However the host controller driver _does_ know (or at least, > > it _should_ know). It should guarantee that all URBs fail > > quickly when the device is not plugged in. It should not > > wait forever for a DMA transfer that will never complete. > > > > That's why I suggested you fix the musb driver instead of > > trying to change usb-storage. > > > > The current MUSB HCD driver does not fail the URBs when the device > got disconnected. Then you should fix the musb driver. 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