> I assumed, when working on the usb-storage module, that when a disconnect > occurred all the active URBs referring to that device would quickly fail > or be cancelled by the usb core. Is that not the case? If not, would it > be possible to change things to work this way?
The usbcore+HCD combo doesn't cancel urbs in such cases, though I've also thought it'd be good if the hub driver set dev->state = DISCONNECTED so it would be easy to prevent any new requests from getting submitted. The main HCDs necessarily report different failures on device disconnect, since the hardware acts different. I know that drivers have bugs there; sometimes they only test for the UHCI failure mode, or handle the USB 2.0 transaction translator strangely. Drivers that retry or resubmit are the most error prone. So preventing new submissions in such cases would prevent driver bugs (HCD dependencies) from certain rude consequences. In a similar case some HCDs use the -ESHUTDOWN code (the HCD died). That'd be reasonable to use in this case: same driver fault recovery mode. Cancelations might happen if driver->disconnect() didn't do its job, but that'd be later and I'd not rely on it in any case ... they'd only happen if the device was electrically disconnected. - Dave ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
