Commit 12423061 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: khubd turns port power back on after reset

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.
parent ea2b2c10
......@@ -1285,6 +1285,13 @@ static void hub_port_connect_change(struct usb_hub *hubstate, int 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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment