OHCI: disallow autostop when wakeup is not available
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 14 Nov 2006 21:28:01 +0000 (16:28 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 16 Nov 2006 22:26:11 +0000 (14:26 -0800)
This patch (as822) prevents the OHCI autostop mechanism from kicking in
if the root hub is not able or not allowed to issue wakeup requests.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ohci-hub.c

index 6f113596af66c1660ecc2548f6b8c40b5c26d4e5..da09e7930c1b4baf0db594de23bc84fcdf84bc83 100644 (file)
@@ -422,7 +422,8 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
                                ohci->autostop = 0;
                                ohci->next_statechange = jiffies +
                                                STATECHANGE_DELAY;
-                       } else if (time_after_eq (jiffies,
+                       } else if (device_may_wakeup(&hcd->self.root_hub->dev)
+                                       && time_after_eq(jiffies,
                                                ohci->next_statechange)
                                        && !ohci->ed_rm_list
                                        && !(ohci->hc_control &