This patch will try to reset the port after a failed enumeration of the
device and then try enumerating it again.
This is similar to what Windows does and should increase compatibility
with slightly out of spec devices.
The patch is relative to my hub-errors.patch (2.4.0-test1)
JE
--- linux-2.4.0-test1.orig/drivers/usb/hub.c Thu Jun 8 16:45:02 2000
+++ linux-2.4.0-test1/drivers/usb/hub.c Thu Jun 8 15:20:10 2000
@@ -419,11 +419,21 @@
usb_connect(usb);
/* Run it through the hoops (find a driver, etc) */
- if (usb_new_device(usb)) {
- usb_disconnect(&hub->children[port]);
- /* Woops, disable the port */
- dbg("hub: disabling port %d", port + 1);
- usb_clear_port_feature(hub, port + 1, USB_PORT_FEAT_ENABLE);
+ ret = usb_new_device(usb);
+ if (ret) {
+ /* Try resetting the device. Windows does this and it */
+ /* gets some devices working correctly */
+ usb_set_port_feature(hub, port + 1, USB_PORT_FEAT_RESET);
+
+ ret = usb_new_device(usb);
+ if (ret) {
+ usb_disconnect(&hub->children[port]);
+
+ /* Woops, disable the port */
+ dbg("hub: disabling port %d", port + 1);
+ usb_clear_port_feature(hub, port + 1,
+ USB_PORT_FEAT_ENABLE);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]