patch-2.3.43 linux/drivers/usb/hub.c
Next file: linux/drivers/usb/ibmcam.c
Previous file: linux/drivers/usb/hid.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Mon Feb 7 19:12:16 2000
- Orig file:
v2.3.42/linux/drivers/usb/hub.c
- Orig date:
Fri Jan 28 15:09:08 2000
diff -u --recursive --new-file v2.3.42/linux/drivers/usb/hub.c linux/drivers/usb/hub.c
@@ -446,8 +446,18 @@
}
if (portchange & USB_PORT_STAT_C_ENABLE) {
- dbg("port %d enable change", i + 1);
+ dbg("port %d enable change, status %x", i + 1, portstatus);
usb_clear_port_feature(dev, i + 1, USB_PORT_FEAT_C_ENABLE);
+
+ // EM interference sometimes causes bad 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)) {
+ err("already running port %i disabled by hub (EMI?), re-enabling...",
+ i + 1);
+ usb_hub_port_connect_change(dev, i);
+ }
}
if (portstatus & USB_PORT_STAT_SUSPEND) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)