This goes with the OHCI anti-deadlock patch, and is what ensures that when a root hub loses power during suspend, khubd can turn port power back on so devices can enumerate.
- Dave
--- bk2/xu26/drivers/usb/core/hub.c 2004-05-06 07:46:43.000000000 -0700
+++ gadget-2.6/drivers/usb/core/hub.c 2004-05-09 10:26:14.000000000 -0700
@@ -1282,9 +1777,16 @@
/* Disconnect any existing devices under this port */
if (hub->children[port])
usb_disconnect(&hub->children[port]);
-
+
/* Return now if nothing is connected */
if (!(portstatus & USB_PORT_STAT_CONNECTION)) {
+
+ /* maybe switch power back on (e.g. root hub was reset) */
+ if ((hubstate->descriptor->wHubCharacteristics
+ & HUB_CHAR_LPSM) < 2
+ && !(portstatus & (1 << USB_PORT_FEAT_POWER)))
+ set_port_feature(hub, port + 1, USB_PORT_FEAT_POWER);
+
if (portstatus & USB_PORT_STAT_ENABLE)
goto done;
return;
