diff options
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
| -rw-r--r-- | drivers/usb/host/ehci-hub.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index c75d9270c752..19372673bf09 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
| @@ -196,7 +196,9 @@ static int ehci_bus_suspend (struct usb_hcd *hcd) | |||
| 196 | if (hostpc_reg) { | 196 | if (hostpc_reg) { |
| 197 | u32 t3; | 197 | u32 t3; |
| 198 | 198 | ||
| 199 | spin_unlock_irq(&ehci->lock); | ||
| 199 | msleep(5);/* 5ms for HCD enter low pwr mode */ | 200 | msleep(5);/* 5ms for HCD enter low pwr mode */ |
| 201 | spin_lock_irq(&ehci->lock); | ||
| 200 | t3 = ehci_readl(ehci, hostpc_reg); | 202 | t3 = ehci_readl(ehci, hostpc_reg); |
| 201 | ehci_writel(ehci, t3 | HOSTPC_PHCD, hostpc_reg); | 203 | ehci_writel(ehci, t3 | HOSTPC_PHCD, hostpc_reg); |
| 202 | t3 = ehci_readl(ehci, hostpc_reg); | 204 | t3 = ehci_readl(ehci, hostpc_reg); |
| @@ -904,17 +906,18 @@ static int ehci_hub_control ( | |||
| 904 | if ((temp & PORT_PE) == 0 | 906 | if ((temp & PORT_PE) == 0 |
| 905 | || (temp & PORT_RESET) != 0) | 907 | || (temp & PORT_RESET) != 0) |
| 906 | goto error; | 908 | goto error; |
| 907 | ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); | 909 | |
| 908 | /* After above check the port must be connected. | 910 | /* After above check the port must be connected. |
| 909 | * Set appropriate bit thus could put phy into low power | 911 | * Set appropriate bit thus could put phy into low power |
| 910 | * mode if we have hostpc feature | 912 | * mode if we have hostpc feature |
| 911 | */ | 913 | */ |
| 914 | temp &= ~PORT_WKCONN_E; | ||
| 915 | temp |= PORT_WKDISC_E | PORT_WKOC_E; | ||
| 916 | ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); | ||
| 912 | if (hostpc_reg) { | 917 | if (hostpc_reg) { |
| 913 | temp &= ~PORT_WKCONN_E; | 918 | spin_unlock_irqrestore(&ehci->lock, flags); |
| 914 | temp |= (PORT_WKDISC_E | PORT_WKOC_E); | ||
| 915 | ehci_writel(ehci, temp | PORT_SUSPEND, | ||
| 916 | status_reg); | ||
| 917 | msleep(5);/* 5ms for HCD enter low pwr mode */ | 919 | msleep(5);/* 5ms for HCD enter low pwr mode */ |
| 920 | spin_lock_irqsave(&ehci->lock, flags); | ||
| 918 | temp1 = ehci_readl(ehci, hostpc_reg); | 921 | temp1 = ehci_readl(ehci, hostpc_reg); |
| 919 | ehci_writel(ehci, temp1 | HOSTPC_PHCD, | 922 | ehci_writel(ehci, temp1 | HOSTPC_PHCD, |
| 920 | hostpc_reg); | 923 | hostpc_reg); |
