* [GIT PULL] USB resume timeout rework for v4.1
@ 2015-04-07 22:49 Felipe Balbi
2015-04-09 10:17 ` Grégory Herrero
0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2015-04-07 22:49 UTC (permalink / raw)
To: Greg KH; +Cc: Linux Kernel Mailing List, Linux USB Mailing List, Felipe Balbi
Hi Greg,
As promised, here's a pull request with only the resume timeout
patches. I've rebased and retested them with my available platforms.
Let me know if you want anything to be changed.
cheers
The following changes since commit 3e457371f436e89ce9239674828f9729a36b2595:
usb: musb: Fix fifo reads for dm816x with musb_dsps (2015-03-24 11:36:38 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git tags/usb-for-v4.1-part2
for you to fetch changes up to bbc78c07a51f6fd29c227b1220a9016e585358ba:
usb: core: hub: use new USB_RESUME_TIMEOUT (2015-04-07 12:58:36 -0500)
----------------------------------------------------------------
usb: generic resume timeout for v4.1
This part 2 pull request contains only the patches
which make sure everybody on linux uses the same
resume timeout value.
Signed-off-by: Felipe Balbi <balbi@ti.com>
----------------------------------------------------------------
Felipe Balbi (14):
usb: define a generic USB_RESUME_TIMEOUT macro
usb: host: xhci: use new USB_RESUME_TIMEOUT
usb: host: ehci: use new USB_RESUME_TIMEOUT
usb: host: uhci: use new USB_RESUME_TIMEOUT
usb: musb: use new USB_RESUME_TIMEOUT
usb: host: isp116x: use new USB_RESUME_TIMEOUT
usb: host: fotg210: use new USB_RESUME_TIMEOUT
usb: host: fusbh200: use new USB_RESUME_TIMEOUT
usb: host: oxu210hp: use new USB_RESUME_TIMEOUT
usb: host: r8a66597: use new USB_RESUME_TIMEOUT
usb: host: sl811: use new USB_RESUME_TIMEOUT
usb: dwc2: hcd: use new USB_RESUME_TIMEOUT
usb: isp1760: hcd: use new USB_RESUME_TIMEOUT
usb: core: hub: use new USB_RESUME_TIMEOUT
drivers/usb/core/hub.c | 4 ++--
drivers/usb/dwc2/hcd.c | 2 +-
drivers/usb/host/ehci-hcd.c | 10 +++++-----
drivers/usb/host/ehci-hub.c | 9 ++++++---
drivers/usb/host/fotg210-hcd.c | 2 +-
drivers/usb/host/fusbh200-hcd.c | 3 +--
drivers/usb/host/isp116x-hcd.c | 2 +-
drivers/usb/host/oxu210hp-hcd.c | 7 ++++---
drivers/usb/host/r8a66597-hcd.c | 2 +-
drivers/usb/host/sl811-hcd.c | 2 +-
drivers/usb/host/uhci-hub.c | 5 +++--
drivers/usb/host/xhci-ring.c | 2 +-
drivers/usb/isp1760/isp1760-hcd.c | 2 +-
drivers/usb/musb/musb_core.c | 7 ++++---
drivers/usb/musb/musb_virthub.c | 2 +-
include/linux/usb.h | 26 ++++++++++++++++++++++++++
16 files changed, 59 insertions(+), 28 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [GIT PULL] USB resume timeout rework for v4.1 2015-04-07 22:49 [GIT PULL] USB resume timeout rework for v4.1 Felipe Balbi @ 2015-04-09 10:17 ` Grégory Herrero 2015-04-09 13:44 ` Felipe Balbi 0 siblings, 1 reply; 5+ messages in thread From: Grégory Herrero @ 2015-04-09 10:17 UTC (permalink / raw) To: Felipe Balbi; +Cc: Greg KH, Linux Kernel Mailing List, Linux USB Mailing List [-- Attachment #1: Type: text/plain, Size: 3073 bytes --] Hi Felipe, Following patch: usb: dwc2: hcd: use new USB_RESUME_TIMEOUT is not correct. The delay is currently done before the controller drives the resume timeout. Attached patch fix this issue. 2015-04-07 22:49 GMT+00:00 Felipe Balbi <balbi@ti.com>: > Hi Greg, > > As promised, here's a pull request with only the resume timeout > patches. I've rebased and retested them with my available platforms. > > Let me know if you want anything to be changed. > > cheers > > The following changes since commit 3e457371f436e89ce9239674828f9729a36b2595: > > usb: musb: Fix fifo reads for dm816x with musb_dsps (2015-03-24 11:36:38 -0500) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git tags/usb-for-v4.1-part2 > > for you to fetch changes up to bbc78c07a51f6fd29c227b1220a9016e585358ba: > > usb: core: hub: use new USB_RESUME_TIMEOUT (2015-04-07 12:58:36 -0500) > > ---------------------------------------------------------------- > usb: generic resume timeout for v4.1 > > This part 2 pull request contains only the patches > which make sure everybody on linux uses the same > resume timeout value. > > Signed-off-by: Felipe Balbi <balbi@ti.com> > > ---------------------------------------------------------------- > Felipe Balbi (14): > usb: define a generic USB_RESUME_TIMEOUT macro > usb: host: xhci: use new USB_RESUME_TIMEOUT > usb: host: ehci: use new USB_RESUME_TIMEOUT > usb: host: uhci: use new USB_RESUME_TIMEOUT > usb: musb: use new USB_RESUME_TIMEOUT > usb: host: isp116x: use new USB_RESUME_TIMEOUT > usb: host: fotg210: use new USB_RESUME_TIMEOUT > usb: host: fusbh200: use new USB_RESUME_TIMEOUT > usb: host: oxu210hp: use new USB_RESUME_TIMEOUT > usb: host: r8a66597: use new USB_RESUME_TIMEOUT > usb: host: sl811: use new USB_RESUME_TIMEOUT > usb: dwc2: hcd: use new USB_RESUME_TIMEOUT > usb: isp1760: hcd: use new USB_RESUME_TIMEOUT > usb: core: hub: use new USB_RESUME_TIMEOUT > > drivers/usb/core/hub.c | 4 ++-- > drivers/usb/dwc2/hcd.c | 2 +- > drivers/usb/host/ehci-hcd.c | 10 +++++----- > drivers/usb/host/ehci-hub.c | 9 ++++++--- > drivers/usb/host/fotg210-hcd.c | 2 +- > drivers/usb/host/fusbh200-hcd.c | 3 +-- > drivers/usb/host/isp116x-hcd.c | 2 +- > drivers/usb/host/oxu210hp-hcd.c | 7 ++++--- > drivers/usb/host/r8a66597-hcd.c | 2 +- > drivers/usb/host/sl811-hcd.c | 2 +- > drivers/usb/host/uhci-hub.c | 5 +++-- > drivers/usb/host/xhci-ring.c | 2 +- > drivers/usb/isp1760/isp1760-hcd.c | 2 +- > drivers/usb/musb/musb_core.c | 7 ++++--- > drivers/usb/musb/musb_virthub.c | 2 +- > include/linux/usb.h | 26 ++++++++++++++++++++++++++ > 16 files changed, 59 insertions(+), 28 deletions(-) > -- > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html [-- Attachment #2: 0001-usb-dwc2-host-sleep-USB_RESUME_TIMEOUT-during-resume.patch --] [-- Type: text/x-diff, Size: 1254 bytes --] From d4996890e535d0582cc845bbeaa75ad4de693d92 Mon Sep 17 00:00:00 2001 From: Gregory Herrero <gregory.herrero@intel.com> Date: Fri, 3 Apr 2015 10:53:25 +0200 Subject: [PATCH] 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> --- drivers/usb/dwc2/hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index fdf40a0..4b6f4ab 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -1534,13 +1534,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); -- 1.7.10.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL] USB resume timeout rework for v4.1 2015-04-09 10:17 ` Grégory Herrero @ 2015-04-09 13:44 ` Felipe Balbi 2015-04-10 11:53 ` Greg KH 0 siblings, 1 reply; 5+ messages in thread From: Felipe Balbi @ 2015-04-09 13:44 UTC (permalink / raw) To: Grégory Herrero Cc: Felipe Balbi, Greg KH, Linux Kernel Mailing List, Linux USB Mailing List [-- Attachment #1: Type: text/plain, Size: 4941 bytes --] On Thu, Apr 09, 2015 at 10:17:08AM +0000, Grégory Herrero wrote: > Hi Felipe, > > Following patch: usb: dwc2: hcd: use new USB_RESUME_TIMEOUT is not correct. > The delay is currently done before the controller drives the resume timeout. > Attached patch fix this issue. > > 2015-04-07 22:49 GMT+00:00 Felipe Balbi <balbi@ti.com>: > > Hi Greg, > > > > As promised, here's a pull request with only the resume timeout > > patches. I've rebased and retested them with my available platforms. > > > > Let me know if you want anything to be changed. > > > > cheers > > > > The following changes since commit 3e457371f436e89ce9239674828f9729a36b2595: > > > > usb: musb: Fix fifo reads for dm816x with musb_dsps (2015-03-24 11:36:38 -0500) > > > > are available in the git repository at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git tags/usb-for-v4.1-part2 > > > > for you to fetch changes up to bbc78c07a51f6fd29c227b1220a9016e585358ba: > > > > usb: core: hub: use new USB_RESUME_TIMEOUT (2015-04-07 12:58:36 -0500) > > > > ---------------------------------------------------------------- > > usb: generic resume timeout for v4.1 > > > > This part 2 pull request contains only the patches > > which make sure everybody on linux uses the same > > resume timeout value. > > > > Signed-off-by: Felipe Balbi <balbi@ti.com> > > > > ---------------------------------------------------------------- > > Felipe Balbi (14): > > usb: define a generic USB_RESUME_TIMEOUT macro > > usb: host: xhci: use new USB_RESUME_TIMEOUT > > usb: host: ehci: use new USB_RESUME_TIMEOUT > > usb: host: uhci: use new USB_RESUME_TIMEOUT > > usb: musb: use new USB_RESUME_TIMEOUT > > usb: host: isp116x: use new USB_RESUME_TIMEOUT > > usb: host: fotg210: use new USB_RESUME_TIMEOUT > > usb: host: fusbh200: use new USB_RESUME_TIMEOUT > > usb: host: oxu210hp: use new USB_RESUME_TIMEOUT > > usb: host: r8a66597: use new USB_RESUME_TIMEOUT > > usb: host: sl811: use new USB_RESUME_TIMEOUT > > usb: dwc2: hcd: use new USB_RESUME_TIMEOUT > > usb: isp1760: hcd: use new USB_RESUME_TIMEOUT > > usb: core: hub: use new USB_RESUME_TIMEOUT > > > > drivers/usb/core/hub.c | 4 ++-- > > drivers/usb/dwc2/hcd.c | 2 +- > > drivers/usb/host/ehci-hcd.c | 10 +++++----- > > drivers/usb/host/ehci-hub.c | 9 ++++++--- > > drivers/usb/host/fotg210-hcd.c | 2 +- > > drivers/usb/host/fusbh200-hcd.c | 3 +-- > > drivers/usb/host/isp116x-hcd.c | 2 +- > > drivers/usb/host/oxu210hp-hcd.c | 7 ++++--- > > drivers/usb/host/r8a66597-hcd.c | 2 +- > > drivers/usb/host/sl811-hcd.c | 2 +- > > drivers/usb/host/uhci-hub.c | 5 +++-- > > drivers/usb/host/xhci-ring.c | 2 +- > > drivers/usb/isp1760/isp1760-hcd.c | 2 +- > > drivers/usb/musb/musb_core.c | 7 ++++--- > > drivers/usb/musb/musb_virthub.c | 2 +- > > include/linux/usb.h | 26 ++++++++++++++++++++++++++ > > 16 files changed, 59 insertions(+), 28 deletions(-) > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at http://vger.kernel.org/majordomo-info.html > From d4996890e535d0582cc845bbeaa75ad4de693d92 Mon Sep 17 00:00:00 2001 > From: Gregory Herrero <gregory.herrero@intel.com> > Date: Fri, 3 Apr 2015 10:53:25 +0200 > Subject: [PATCH] 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> > --- > drivers/usb/dwc2/hcd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c > index fdf40a0..4b6f4ab 100644 > --- a/drivers/usb/dwc2/hcd.c > +++ b/drivers/usb/dwc2/hcd.c > @@ -1534,13 +1534,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); Greg, I can fold this into original patch, but then I guess it becomes too late to get this into this merge window. Your call, should I resend a pull request, or will you take this extra hunk as a separate patch ? -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL] USB resume timeout rework for v4.1 2015-04-09 13:44 ` Felipe Balbi @ 2015-04-10 11:53 ` Greg KH 2015-04-10 15:21 ` Felipe Balbi 0 siblings, 1 reply; 5+ messages in thread From: Greg KH @ 2015-04-10 11:53 UTC (permalink / raw) To: Felipe Balbi Cc: Grégory Herrero, Linux Kernel Mailing List, Linux USB Mailing List On Thu, Apr 09, 2015 at 08:44:47AM -0500, Felipe Balbi wrote: > On Thu, Apr 09, 2015 at 10:17:08AM +0000, Grégory Herrero wrote: > > Hi Felipe, > > > > Following patch: usb: dwc2: hcd: use new USB_RESUME_TIMEOUT is not correct. > > The delay is currently done before the controller drives the resume timeout. > > Attached patch fix this issue. > > > > 2015-04-07 22:49 GMT+00:00 Felipe Balbi <balbi@ti.com>: > > > Hi Greg, > > > > > > As promised, here's a pull request with only the resume timeout > > > patches. I've rebased and retested them with my available platforms. > > > > > > Let me know if you want anything to be changed. > > > > > > cheers > > > > > > The following changes since commit 3e457371f436e89ce9239674828f9729a36b2595: > > > > > > usb: musb: Fix fifo reads for dm816x with musb_dsps (2015-03-24 11:36:38 -0500) > > > > > > are available in the git repository at: > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git tags/usb-for-v4.1-part2 > > > > > > for you to fetch changes up to bbc78c07a51f6fd29c227b1220a9016e585358ba: > > > > > > usb: core: hub: use new USB_RESUME_TIMEOUT (2015-04-07 12:58:36 -0500) > > > > > > ---------------------------------------------------------------- > > > usb: generic resume timeout for v4.1 > > > > > > This part 2 pull request contains only the patches > > > which make sure everybody on linux uses the same > > > resume timeout value. > > > > > > Signed-off-by: Felipe Balbi <balbi@ti.com> > > > > > > ---------------------------------------------------------------- > > > Felipe Balbi (14): > > > usb: define a generic USB_RESUME_TIMEOUT macro > > > usb: host: xhci: use new USB_RESUME_TIMEOUT > > > usb: host: ehci: use new USB_RESUME_TIMEOUT > > > usb: host: uhci: use new USB_RESUME_TIMEOUT > > > usb: musb: use new USB_RESUME_TIMEOUT > > > usb: host: isp116x: use new USB_RESUME_TIMEOUT > > > usb: host: fotg210: use new USB_RESUME_TIMEOUT > > > usb: host: fusbh200: use new USB_RESUME_TIMEOUT > > > usb: host: oxu210hp: use new USB_RESUME_TIMEOUT > > > usb: host: r8a66597: use new USB_RESUME_TIMEOUT > > > usb: host: sl811: use new USB_RESUME_TIMEOUT > > > usb: dwc2: hcd: use new USB_RESUME_TIMEOUT > > > usb: isp1760: hcd: use new USB_RESUME_TIMEOUT > > > usb: core: hub: use new USB_RESUME_TIMEOUT > > > > > > drivers/usb/core/hub.c | 4 ++-- > > > drivers/usb/dwc2/hcd.c | 2 +- > > > drivers/usb/host/ehci-hcd.c | 10 +++++----- > > > drivers/usb/host/ehci-hub.c | 9 ++++++--- > > > drivers/usb/host/fotg210-hcd.c | 2 +- > > > drivers/usb/host/fusbh200-hcd.c | 3 +-- > > > drivers/usb/host/isp116x-hcd.c | 2 +- > > > drivers/usb/host/oxu210hp-hcd.c | 7 ++++--- > > > drivers/usb/host/r8a66597-hcd.c | 2 +- > > > drivers/usb/host/sl811-hcd.c | 2 +- > > > drivers/usb/host/uhci-hub.c | 5 +++-- > > > drivers/usb/host/xhci-ring.c | 2 +- > > > drivers/usb/isp1760/isp1760-hcd.c | 2 +- > > > drivers/usb/musb/musb_core.c | 7 ++++--- > > > drivers/usb/musb/musb_virthub.c | 2 +- > > > include/linux/usb.h | 26 ++++++++++++++++++++++++++ > > > 16 files changed, 59 insertions(+), 28 deletions(-) > > > -- > > > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > > > the body of a message to majordomo@vger.kernel.org > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > From d4996890e535d0582cc845bbeaa75ad4de693d92 Mon Sep 17 00:00:00 2001 > > From: Gregory Herrero <gregory.herrero@intel.com> > > Date: Fri, 3 Apr 2015 10:53:25 +0200 > > Subject: [PATCH] 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> > > --- > > drivers/usb/dwc2/hcd.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c > > index fdf40a0..4b6f4ab 100644 > > --- a/drivers/usb/dwc2/hcd.c > > +++ b/drivers/usb/dwc2/hcd.c > > @@ -1534,13 +1534,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); > > Greg, I can fold this into original patch, but then I guess it becomes > too late to get this into this merge window. Your call, should I resend > a pull request, or will you take this extra hunk as a separate patch ? I've taken your pull request and added this patch on top of it, so all should be good now. thanks, greg k-h ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL] USB resume timeout rework for v4.1 2015-04-10 11:53 ` Greg KH @ 2015-04-10 15:21 ` Felipe Balbi 0 siblings, 0 replies; 5+ messages in thread From: Felipe Balbi @ 2015-04-10 15:21 UTC (permalink / raw) To: Greg KH Cc: Felipe Balbi, Grégory Herrero, Linux Kernel Mailing List, Linux USB Mailing List [-- Attachment #1: Type: text/plain, Size: 5650 bytes --] On Fri, Apr 10, 2015 at 01:53:14PM +0200, Greg KH wrote: > On Thu, Apr 09, 2015 at 08:44:47AM -0500, Felipe Balbi wrote: > > On Thu, Apr 09, 2015 at 10:17:08AM +0000, Grégory Herrero wrote: > > > Hi Felipe, > > > > > > Following patch: usb: dwc2: hcd: use new USB_RESUME_TIMEOUT is not correct. > > > The delay is currently done before the controller drives the resume timeout. > > > Attached patch fix this issue. > > > > > > 2015-04-07 22:49 GMT+00:00 Felipe Balbi <balbi@ti.com>: > > > > Hi Greg, > > > > > > > > As promised, here's a pull request with only the resume timeout > > > > patches. I've rebased and retested them with my available platforms. > > > > > > > > Let me know if you want anything to be changed. > > > > > > > > cheers > > > > > > > > The following changes since commit 3e457371f436e89ce9239674828f9729a36b2595: > > > > > > > > usb: musb: Fix fifo reads for dm816x with musb_dsps (2015-03-24 11:36:38 -0500) > > > > > > > > are available in the git repository at: > > > > > > > > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git tags/usb-for-v4.1-part2 > > > > > > > > for you to fetch changes up to bbc78c07a51f6fd29c227b1220a9016e585358ba: > > > > > > > > usb: core: hub: use new USB_RESUME_TIMEOUT (2015-04-07 12:58:36 -0500) > > > > > > > > ---------------------------------------------------------------- > > > > usb: generic resume timeout for v4.1 > > > > > > > > This part 2 pull request contains only the patches > > > > which make sure everybody on linux uses the same > > > > resume timeout value. > > > > > > > > Signed-off-by: Felipe Balbi <balbi@ti.com> > > > > > > > > ---------------------------------------------------------------- > > > > Felipe Balbi (14): > > > > usb: define a generic USB_RESUME_TIMEOUT macro > > > > usb: host: xhci: use new USB_RESUME_TIMEOUT > > > > usb: host: ehci: use new USB_RESUME_TIMEOUT > > > > usb: host: uhci: use new USB_RESUME_TIMEOUT > > > > usb: musb: use new USB_RESUME_TIMEOUT > > > > usb: host: isp116x: use new USB_RESUME_TIMEOUT > > > > usb: host: fotg210: use new USB_RESUME_TIMEOUT > > > > usb: host: fusbh200: use new USB_RESUME_TIMEOUT > > > > usb: host: oxu210hp: use new USB_RESUME_TIMEOUT > > > > usb: host: r8a66597: use new USB_RESUME_TIMEOUT > > > > usb: host: sl811: use new USB_RESUME_TIMEOUT > > > > usb: dwc2: hcd: use new USB_RESUME_TIMEOUT > > > > usb: isp1760: hcd: use new USB_RESUME_TIMEOUT > > > > usb: core: hub: use new USB_RESUME_TIMEOUT > > > > > > > > drivers/usb/core/hub.c | 4 ++-- > > > > drivers/usb/dwc2/hcd.c | 2 +- > > > > drivers/usb/host/ehci-hcd.c | 10 +++++----- > > > > drivers/usb/host/ehci-hub.c | 9 ++++++--- > > > > drivers/usb/host/fotg210-hcd.c | 2 +- > > > > drivers/usb/host/fusbh200-hcd.c | 3 +-- > > > > drivers/usb/host/isp116x-hcd.c | 2 +- > > > > drivers/usb/host/oxu210hp-hcd.c | 7 ++++--- > > > > drivers/usb/host/r8a66597-hcd.c | 2 +- > > > > drivers/usb/host/sl811-hcd.c | 2 +- > > > > drivers/usb/host/uhci-hub.c | 5 +++-- > > > > drivers/usb/host/xhci-ring.c | 2 +- > > > > drivers/usb/isp1760/isp1760-hcd.c | 2 +- > > > > drivers/usb/musb/musb_core.c | 7 ++++--- > > > > drivers/usb/musb/musb_virthub.c | 2 +- > > > > include/linux/usb.h | 26 ++++++++++++++++++++++++++ > > > > 16 files changed, 59 insertions(+), 28 deletions(-) > > > > -- > > > > To unsubscribe from this list: send the line "unsubscribe linux-usb" in > > > > the body of a message to majordomo@vger.kernel.org > > > > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > > From d4996890e535d0582cc845bbeaa75ad4de693d92 Mon Sep 17 00:00:00 2001 > > > From: Gregory Herrero <gregory.herrero@intel.com> > > > Date: Fri, 3 Apr 2015 10:53:25 +0200 > > > Subject: [PATCH] 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> > > > --- > > > drivers/usb/dwc2/hcd.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c > > > index fdf40a0..4b6f4ab 100644 > > > --- a/drivers/usb/dwc2/hcd.c > > > +++ b/drivers/usb/dwc2/hcd.c > > > @@ -1534,13 +1534,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); > > > > Greg, I can fold this into original patch, but then I guess it becomes > > too late to get this into this merge window. Your call, should I resend > > a pull request, or will you take this extra hunk as a separate patch ? > > I've taken your pull request and added this patch on top of it, so all > should be good now. Alright, thanks Greg. -- balbi [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-04-10 15:22 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-04-07 22:49 [GIT PULL] USB resume timeout rework for v4.1 Felipe Balbi 2015-04-09 10:17 ` Grégory Herrero 2015-04-09 13:44 ` Felipe Balbi 2015-04-10 11:53 ` Greg KH 2015-04-10 15:21 ` Felipe Balbi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome