diff options
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 2507e898af09..2f7037c62e88 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -759,12 +759,16 @@ static int ehci_resume (struct usb_hcd *hcd) | |||
759 | if (time_before (jiffies, ehci->next_statechange)) | 759 | if (time_before (jiffies, ehci->next_statechange)) |
760 | msleep (100); | 760 | msleep (100); |
761 | 761 | ||
762 | /* If any port is suspended, we know we can/must resume the HC. */ | 762 | /* If any port is suspended (or owned by the companion), |
763 | * we know we can/must resume the HC (and mustn't reset it). | ||
764 | */ | ||
763 | for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; ) { | 765 | for (port = HCS_N_PORTS (ehci->hcs_params); port > 0; ) { |
764 | u32 status; | 766 | u32 status; |
765 | port--; | 767 | port--; |
766 | status = readl (&ehci->regs->port_status [port]); | 768 | status = readl (&ehci->regs->port_status [port]); |
767 | if (status & PORT_SUSPEND) { | 769 | if (!(status & PORT_POWER)) |
770 | continue; | ||
771 | if (status & (PORT_SUSPEND | PORT_OWNER)) { | ||
768 | down (&hcd->self.root_hub->serialize); | 772 | down (&hcd->self.root_hub->serialize); |
769 | retval = ehci_hub_resume (hcd); | 773 | retval = ehci_hub_resume (hcd); |
770 | up (&hcd->self.root_hub->serialize); | 774 | up (&hcd->self.root_hub->serialize); |