Well, it has happened at last, just as Oliver predicted.  A user has a 
Western Digital USB disk drive with an extra HID interface tacked on, the 
drive encounters data transmission errors, and usb-storage skips doing a 
port reset because of the extra interface.  As a result, error recovery 
takes a long time (on the order of a minute) and is unreliable.  See

        http://bugzilla.kernel.org/show_bug.cgi?id=5894

In this case the extra interface didn't matter because it wasn't being
used.  Eventually one will be used, and that means we need a good way to
reset devices with multiple interfaces.

My idea is to add a new method to struct usb_driver, something like

        void    (*reset_notify)(struct usb_interface *intf, int after);

The core would call this routine for each interface before the reset with
after set to 0, and again afterwards with after set to 1.  Maybe it would
skip the interface owned by the driver requesting the reset.  Anyway, each
driver would have a chance to stop whatever it's doing and then
re-initialize its interface when the reset was complete.  In many cases 
the driver could treat it the same as a disconnect followed by a probe.

Drivers with no reset_notify method would have to cope as best they can -- 
it won't be a very big problem because there aren't all that many 
composite devices around.

Comments?

Alan Stern



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to