diff options
author | Gregory Herrero <gregory.herrero@intel.com> | 2015-04-03 10:53:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-10 13:52:49 +0200 |
commit | 42a6630a875c17b8ad129d2cc0472217107147ad (patch) | |
tree | a6f4700885fc4dfd27b9f7db933d5d73f31753a4 /drivers/usb | |
parent | Merge tag 'usb-ci-v4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
download | linux-42a6630a875c17b8ad129d2cc0472217107147ad.tar.xz linux-42a6630a875c17b8ad129d2cc0472217107147ad.zip |
usb: dwc2: host: sleep USB_RESUME_TIMEOUT during resume
msleep(USB_RESUME_TIMEOUT) must be done when the controller drives
the resume. This is true after HPRT0_RES is written.
Moreover, restore the delay after controller power is up.
Signed-off-by: Gregory Herrero <gregory.herrero@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 93bd4a10ab52..fbbbac2150a5 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -1529,13 +1529,13 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, dev_dbg(hsotg->dev, "ClearPortFeature USB_PORT_FEAT_SUSPEND\n"); writel(0, hsotg->regs + PCGCTL); - msleep(USB_RESUME_TIMEOUT); + usleep_range(20000, 40000); hprt0 = dwc2_read_hprt0(hsotg); hprt0 |= HPRT0_RES; writel(hprt0, hsotg->regs + HPRT0); hprt0 &= ~HPRT0_SUSP; - usleep_range(100000, 150000); + msleep(USB_RESUME_TIMEOUT); hprt0 &= ~HPRT0_RES; writel(hprt0, hsotg->regs + HPRT0); |