Sorry, my original posting had a missing '}'. Here's the corrected
version.
Alan Stern
===== hub.c 1.112 vs edited =====
--- 1.112/drivers/usb/core/hub.c Fri Jun 20 13:12:57 2003
+++ edited/drivers/usb/core/hub.c Mon Jul 21 11:35:07 2003
@@ -876,13 +876,6 @@
unsigned int delay = HUB_SHORT_RESET_TIME;
int i;
- dev_dbg (&hubstate->intf->dev,
- "port %d, status %x, change %x, %s\n",
- port + 1, portstatus, portchange, portspeed (portstatus));
-
- /* Clear the connection change status */
- clear_port_feature(hub, port + 1, USB_PORT_FEAT_C_CONNECTION);
-
/* Disconnect any existing devices under this port */
if (hub->children[port])
usb_disconnect(&hub->children[port]);
@@ -1051,31 +1044,20 @@
}
if (portchange & USB_PORT_STAT_C_CONNECTION) {
- hub_port_connect_change(hub, i, portstatus,
portchange);
- } else if (portchange & USB_PORT_STAT_C_ENABLE) {
+ dev_dbg (&hub->intf->dev,
+ "port %d, status %x, change %x, %s\n",
+ i + 1, portstatus, portchange,
+ portspeed (portstatus));
+ clear_port_feature(dev,
+ i + 1, USB_PORT_FEAT_C_CONNECTION);
+ }
+
+ if (portchange & USB_PORT_STAT_C_ENABLE) {
dev_dbg (hubdev (dev),
"port %d enable change, status %x\n",
i + 1, portstatus);
clear_port_feature(dev,
i + 1, USB_PORT_FEAT_C_ENABLE);
-
- /*
- * EM interference sometimes causes badly
- * shielded USB devices to be shutdown by
- * the hub, this hack enables them again.
- * Works at least with mouse driver.
- */
- if (!(portstatus & USB_PORT_STAT_ENABLE)
- && (portstatus & USB_PORT_STAT_CONNECTION)
- && (dev->children[i])) {
- dev_err (&hub->intf->dev,
- "port %i "
- "disabled by hub (EMI?), "
- "re-enabling...",
- i + 1);
- hub_port_connect_change(hub,
- i, portstatus, portchange);
- }
}
if (portchange & USB_PORT_STAT_C_SUSPEND) {
@@ -1101,6 +1083,32 @@
i + 1);
clear_port_feature(dev,
i + 1, USB_PORT_FEAT_C_RESET);
+ }
+
+ if (portchange & USB_PORT_STAT_C_CONNECTION) {
+ hub_port_connect_change(hub, i, portstatus,
+ portchange);
+ }
+
+ if (portchange & USB_PORT_STAT_C_ENABLE) {
+
+ /*
+ * EM interference sometimes causes badly
+ * shielded USB devices to be shutdown by
+ * the hub, this hack enables them again.
+ * Works at least with mouse driver.
+ */
+ if (!(portstatus & USB_PORT_STAT_ENABLE)
+ && (portstatus & USB_PORT_STAT_CONNECTION)
+ && (dev->children[i])) {
+ dev_err (&hub->intf->dev,
+ "port %i "
+ "disabled by hub (EMI?), "
+ "re-enabling...",
+ i + 1);
+ hub_port_connect_change(hub,
+ i, portstatus, portchange);
+ }
}
} /* end for i */
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel