Am Montag, 16. Januar 2006 17:21 schrieb Alan Stern:
> 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

Using my prophetic powers I declare this interface ugly. If you have
two distinct stages, have two methods.

> 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.

There's a certain danger of getting a reset followed by a secondary reset
as an error treatment, followed by ... Could you do a real disconnect in
theses cases?

        Regards
                Oliver


-------------------------------------------------------
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
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