diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2013-08-01 17:09:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-01 17:37:07 -0400 |
commit | 3a20446f02bfb71d68ae9ec673268bb7823f878c (patch) | |
tree | 410c70a681b1e3eaee9632f0f161c7f6113cd1f3 /drivers/usb/host/ehci-hub.c | |
parent | b8bdad608213caffa081a97d2e937e5fe08c4046 (diff) |
USB: EHCI: keep better track of resuming ports
The ehci-hcd driver isn't as careful as it should be about the way it
uses ehci->resuming_ports. One of the omissions was fixed recently by
commit 47a64a13d54 (USB: EHCI: Fix resume signalling on remote
wakeup), but there are other places that need attention:
When a port's suspend feature is explicitly cleared, the
corresponding bit in resuming_ports should be set and the core
should be notified about the port resume.
We don't need to clear a resuming_ports bit when a reset
completes.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r-- | drivers/usb/host/ehci-hub.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 6dce37555c4f..6d0e59306ed9 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
@@ -801,6 +801,8 @@ static int ehci_hub_control ( | |||
801 | ehci_writel(ehci, temp | PORT_RESUME, status_reg); | 801 | ehci_writel(ehci, temp | PORT_RESUME, status_reg); |
802 | ehci->reset_done[wIndex] = jiffies | 802 | ehci->reset_done[wIndex] = jiffies |
803 | + msecs_to_jiffies(20); | 803 | + msecs_to_jiffies(20); |
804 | set_bit(wIndex, &ehci->resuming_ports); | ||
805 | usb_hcd_start_port_resume(&hcd->self, wIndex); | ||
804 | break; | 806 | break; |
805 | case USB_PORT_FEAT_C_SUSPEND: | 807 | case USB_PORT_FEAT_C_SUSPEND: |
806 | clear_bit(wIndex, &ehci->port_c_suspend); | 808 | clear_bit(wIndex, &ehci->port_c_suspend); |
@@ -911,7 +913,6 @@ static int ehci_hub_control ( | |||
911 | ehci->reset_done[wIndex])) { | 913 | ehci->reset_done[wIndex])) { |
912 | status |= USB_PORT_STAT_C_RESET << 16; | 914 | status |= USB_PORT_STAT_C_RESET << 16; |
913 | ehci->reset_done [wIndex] = 0; | 915 | ehci->reset_done [wIndex] = 0; |
914 | clear_bit(wIndex, &ehci->resuming_ports); | ||
915 | 916 | ||
916 | /* force reset to complete */ | 917 | /* force reset to complete */ |
917 | ehci_writel(ehci, temp & ~(PORT_RWC_BITS | PORT_RESET), | 918 | ehci_writel(ehci, temp & ~(PORT_RWC_BITS | PORT_RESET), |