diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2010-06-25 14:02:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-10 17:35:37 -0400 |
commit | ee0b9be829803e3ff5adec7456bd59a08425ffa1 (patch) | |
tree | bab8946024f7c93428a383b813a7cfc94e71a409 /drivers/usb/host/ehci-hub.c | |
parent | 4147200d25c423e627ab4487530b3d9f2ef829c8 (diff) |
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/ehci-hub.c')
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 1292a5b2197a..796ea0c8900f 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -166,6 +166,10 @@ static void ehci_adjust_port_wakeup_flags(struct ehci_hcd *ehci, | |||
166 | ehci_writel(ehci, temp | HOSTPC_PHCD, hostpc_reg); | 166 | ehci_writel(ehci, temp | HOSTPC_PHCD, hostpc_reg); |
167 | } | 167 | } |
168 | } | 168 | } |
169 | |||
170 | /* Does the root hub have a port wakeup pending? */ | ||
171 | if (!suspending && (ehci_readl(ehci, &ehci->regs->status) & STS_PCD)) | ||
172 | usb_hcd_resume_root_hub(ehci_to_hcd(ehci)); | ||
169 | } | 173 | } |
170 | 174 | ||
171 | static int ehci_bus_suspend (struct usb_hcd *hcd) | 175 | static int ehci_bus_suspend (struct usb_hcd *hcd) |