diff options
| author | Felipe Balbi <balbi@ti.com> | 2015-02-13 15:42:25 -0500 |
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2015-04-07 13:58:35 -0400 |
| commit | ea16328f80ca8d74434352157f37ef60e2f55ce2 (patch) | |
| tree | 0d80a9aa4dc5b3d32baa0ff90cc999cb51d1f2d5 /drivers/usb/host | |
| parent | b9e451885deb6262dbaf5cd14aa77d192d9ac759 (diff) | |
usb: host: ehci: use new USB_RESUME_TIMEOUT
Make sure we're using the new macro, so our
resume signaling will always pass certification.
Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/host')
| -rw-r--r-- | drivers/usb/host/ehci-hcd.c | 10 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-hub.c | 9 |
2 files changed, 11 insertions, 8 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 85e56d1abd23..f4d88dfb26a7 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
| @@ -792,12 +792,12 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
| 792 | ehci->reset_done[i] == 0)) | 792 | ehci->reset_done[i] == 0)) |
| 793 | continue; | 793 | continue; |
| 794 | 794 | ||
| 795 | /* start 20 msec resume signaling from this port, | 795 | /* start USB_RESUME_TIMEOUT msec resume signaling from |
| 796 | * and make hub_wq collect PORT_STAT_C_SUSPEND to | 796 | * this port, and make hub_wq collect |
| 797 | * stop that signaling. Use 5 ms extra for safety, | 797 | * PORT_STAT_C_SUSPEND to stop that signaling. |
| 798 | * like usb_port_resume() does. | ||
| 799 | */ | 798 | */ |
| 800 | ehci->reset_done[i] = jiffies + msecs_to_jiffies(25); | 799 | ehci->reset_done[i] = jiffies + |
| 800 | msecs_to_jiffies(USB_RESUME_TIMEOUT); | ||
| 801 | set_bit(i, &ehci->resuming_ports); | 801 | set_bit(i, &ehci->resuming_ports); |
| 802 | ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); | 802 | ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); |
| 803 | usb_hcd_start_port_resume(&hcd->self, i); | 803 | usb_hcd_start_port_resume(&hcd->self, i); |
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c index 87cf86f38b36..7354d0129a72 100644 --- a/drivers/usb/host/ehci-hub.c +++ b/drivers/usb/host/ehci-hub.c | |||
| @@ -471,10 +471,13 @@ static int ehci_bus_resume (struct usb_hcd *hcd) | |||
| 471 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); | 471 | ehci_writel(ehci, temp, &ehci->regs->port_status [i]); |
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | /* msleep for 20ms only if code is trying to resume port */ | 474 | /* |
| 475 | * msleep for USB_RESUME_TIMEOUT ms only if code is trying to resume | ||
| 476 | * port | ||
| 477 | */ | ||
| 475 | if (resume_needed) { | 478 | if (resume_needed) { |
| 476 | spin_unlock_irq(&ehci->lock); | 479 | spin_unlock_irq(&ehci->lock); |
| 477 | msleep(20); | 480 | msleep(USB_RESUME_TIMEOUT); |
| 478 | spin_lock_irq(&ehci->lock); | 481 | spin_lock_irq(&ehci->lock); |
| 479 | if (ehci->shutdown) | 482 | if (ehci->shutdown) |
| 480 | goto shutdown; | 483 | goto shutdown; |
| @@ -942,7 +945,7 @@ int ehci_hub_control( | |||
| 942 | temp &= ~PORT_WAKE_BITS; | 945 | temp &= ~PORT_WAKE_BITS; |
| 943 | ehci_writel(ehci, temp | PORT_RESUME, status_reg); | 946 | ehci_writel(ehci, temp | PORT_RESUME, status_reg); |
| 944 | ehci->reset_done[wIndex] = jiffies | 947 | ehci->reset_done[wIndex] = jiffies |
| 945 | + msecs_to_jiffies(20); | 948 | + msecs_to_jiffies(USB_RESUME_TIMEOUT); |
| 946 | set_bit(wIndex, &ehci->resuming_ports); | 949 | set_bit(wIndex, &ehci->resuming_ports); |
| 947 | usb_hcd_start_port_resume(&hcd->self, wIndex); | 950 | usb_hcd_start_port_resume(&hcd->self, wIndex); |
| 948 | break; | 951 | break; |
