On Fri, 3 Sep 2004, Andy Heaton wrote: > > If you are mounting a filesystem for the copy, then why are you unplugging > > the device while it is still mounted? It's not at all surprising that you > > end up with a nasty error. > > Because it's the sort of thing a user would do. I'm working on a product > using embedded linux, with the ability to read and write these USB sticks. > Unplugging in the middle of a transfer is just the sort of thing someone is > going to do. Hard locking the OS is a slightly drastic way of punishing them > for their stupidity!
Maybe so. But that's a problem with the filesystem code, not the USB drivers. There's nothing we can do here to fix it. > > >> I'm almost certain the problem is caused by the ISP116x driver, but I'm > >> completely stuck trying to work out where. When I unplug the memory stick > >> I > >> see a synchronous call to hci_unlink_urb, which does its job and returns. > >> About 20s later I see an asynchronous call to the same function. Tracking > >> back into the kernel, I can see the first call is originating in > >> storage_disconnect (usb/storage/usb.c), and the second is coming from > >> command_abort (usb/storage/scsiglue.c). > > > > That pattern of unlinks doesn't make sense. Once storage_disconnect has > > finished, command_abort should never be called. (Of course, I'm basing > > this on a 2.4.27 kernel -- 2.4.22 might be different but I don't think > > so.) > > Theres a long delay between the two calls. I was guessing the ISP116x driver > was supposed to do something or return something, which then timed out. Can > storage_disconnect fail, even if the driver returns (it returns 0, by thre > way)? In principle storage_disconnect() cannot fail. However, it might not work right. Under 2.6 it was only fairly recently that the disconnect handling was implemented correctly. There may very well still be bugs in the 2.4 code. If you possibly can, you'd be much better off switching to 2.6. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel