Hm, in beating on this for a while, the only thing I saw "odd" was reports of calls failing to usb_unlink_urb() by drivers in their disconnect() functions. Which is what we would expect to have happen here :)
In this case, "no news is good news" !! There are drivers that don't bother looking at completion codes, and might get into infinite resubmit loops -- evil.
Which drivers did you beat on? I'd expect "visor" would be happier after this patch (was it?), and that "hub" would behave (I seem to recall teaching it about -ESHUTDOWN ages ago for other reasons).
OK, then for anyone who wants to test out such a change, try this (untested) patch to see what breaks. It doesn't update the API docs, or the other cases where driver disconnect() methods are called, or any of the disconnect() methods, but it should be a start.
I like it, want to flush out the rest of the places this needs to be changed?
OK, at least so far as usbcore is concerned; and I'll sanity check "usbnet" but not very many other drivers.
I suspect the basic rule of thumb should be that if the driver has URB completion logic that understands -ESHUTDOWN, it'll behave.
- Dave
------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel