diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2010-06-25 20:02:24 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 23:35:37 +0200 |
commit | ee0b9be829803e3ff5adec7456bd59a08425ffa1 (patch) | |
tree | bab8946024f7c93428a383b813a7cfc94e71a409 /drivers/usb/host/uhci-hcd.c | |
parent | USB: add do_wakeup parameter for PCI HCD suspend (diff) | |
download | linux-ee0b9be829803e3ff5adec7456bd59a08425ffa1.tar.xz linux-ee0b9be829803e3ff5adec7456bd59a08425ffa1.zip |
USB: controller resume should check the root hub
This patch (as1394) adds code to ehci-hcd, ohci-hcd, and uhci-hcd for
automatically resuming the root hub when the controller is resumed, if
the root hub has a wakeup request pending on some port.
During resume from system sleep this doesn't matter, because the root
hubs will naturally be resumed along with every other device in the
system. However it _will_ matter for runtime PM: If the controller is
suspended and a remote wakeup request is received then the controller
will autoresume, but we need to ensure that the root hub also
autoresumes. Otherwise the wakeup request would be ignored, the
controller would go back to sleep, and the cycle would repeat a large
number of times (I saw this happen before the patch was written).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/uhci-hcd.c')
-rw-r--r-- | drivers/usb/host/uhci-hcd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index a7850f51fdc5..9d4d81248f96 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c @@ -862,10 +862,11 @@ static int uhci_pci_resume(struct usb_hcd *hcd, bool hibernated) /* If interrupts don't work and remote wakeup is enabled then * the suspended root hub needs to be polled. */ - if (!uhci->RD_enable && hcd->self.root_hub->do_remote_wakeup) { + if (!uhci->RD_enable && hcd->self.root_hub->do_remote_wakeup) set_bit(HCD_FLAG_POLL_RH, &hcd->flags); - usb_hcd_poll_rh_status(hcd); - } + + /* Does the root hub have a port wakeup pending? */ + usb_hcd_poll_rh_status(hcd); return 0; } #endif |