USB resume timeout rework for v4.1
Subsystems (2)
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.
----------------------------------------------------------------
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(-)
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 <[email protected]>:
Quoted 64 lines
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.gittags/usb-for-v4.1-part2for 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.1This 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 <[email protected]>----------------------------------------------------------------
Felipe Balbi (14):
usb: define a genericUSB_RESUME_TIMEOUTmacro
usb: host: xhci: use newUSB_RESUME_TIMEOUT
usb: host: ehci: use newUSB_RESUME_TIMEOUT
usb: host: uhci: use newUSB_RESUME_TIMEOUT
usb: musb: use newUSB_RESUME_TIMEOUT
usb: host: isp116x: use newUSB_RESUME_TIMEOUT
usb: host: fotg210: use newUSB_RESUME_TIMEOUT
usb: host: fusbh200: use newUSB_RESUME_TIMEOUT
usb: host: oxu210hp: use newUSB_RESUME_TIMEOUT
usb: host: r8a66597: use newUSB_RESUME_TIMEOUT
usb: host: sl811: use newUSB_RESUME_TIMEOUT
usb: dwc2: hcd: use newUSB_RESUME_TIMEOUT
usb: isp1760: hcd: use newUSB_RESUME_TIMEOUT
usb: core: hub: use newUSB_RESUME_TIMEOUTdrivers/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(-)
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
From d4996890e535d0582cc845bbeaa75ad4de693d92 Mon Sep 17 00:00:00 2001
From: Gregory Herrero <[email protected]>
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.
--- drivers/usb/dwc2/hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc2/hcd.c +2 -2
@@ -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 );
Signature · 1 line
1.7.10.4
Quoted 100 lines · Grégory Herrero
Hi Felipe,
Following patch: usb: dwc2: hcd: use new
USB_RESUME_TIMEOUTis 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 <[email protected]>:
Quoted 64 lines
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.gittags/usb-for-v4.1-part2for 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.1This 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 <[email protected]>----------------------------------------------------------------
Felipe Balbi (14):
usb: define a genericUSB_RESUME_TIMEOUTmacro
usb: host: xhci: use newUSB_RESUME_TIMEOUT
usb: host: ehci: use newUSB_RESUME_TIMEOUT
usb: host: uhci: use newUSB_RESUME_TIMEOUT
usb: musb: use newUSB_RESUME_TIMEOUT
usb: host: isp116x: use newUSB_RESUME_TIMEOUT
usb: host: fotg210: use newUSB_RESUME_TIMEOUT
usb: host: fusbh200: use newUSB_RESUME_TIMEOUT
usb: host: oxu210hp: use newUSB_RESUME_TIMEOUT
usb: host: r8a66597: use newUSB_RESUME_TIMEOUT
usb: host: sl811: use newUSB_RESUME_TIMEOUT
usb: dwc2: hcd: use newUSB_RESUME_TIMEOUT
usb: isp1760: hcd: use newUSB_RESUME_TIMEOUT
usb: core: hub: use newUSB_RESUME_TIMEOUTdrivers/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(-)Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlFrom
d4996890e535d0582cc845bbeaa75ad4de693d92Mon Sep 17 00:00:00 2001
From: Gregory Herrero <[email protected]>
Date: Fri, 3 Apr 2015 10:53:25 +0200
Subject: [PATCH] usb: dwc2: host: sleepUSB_RESUME_TIMEOUTduring resume
msleep(USB_RESUME_TIMEOUT)must be done when the controller drives the resume. This is true afterHPRT0_RESis written. Moreover, restore the delay after controller power is up.Signed-off-by Gregory Herrero <[email protected]>--- drivers/usb/dwc2/hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/usb/dwc2/hcd.c +1
-1@@ -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 );
drivers/usb/dwc2/hcd.c static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, · line 1546
Quoted 10 lines
drivers/usb/dwc2/hcd.c +1
-1hprt0 =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 ?
Signature · 1 line
balbi
Greg KH
maintainerQuoted 109 lines · Felipe Balbi
Quoted 108 lines · Grégory Herrero
Hi Felipe,
Following patch: usb: dwc2: hcd: use new
USB_RESUME_TIMEOUTis 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 <[email protected]>:
Quoted 64 lines
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.gittags/usb-for-v4.1-part2for 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.1This 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 <[email protected]>----------------------------------------------------------------
Felipe Balbi (14):
usb: define a genericUSB_RESUME_TIMEOUTmacro
usb: host: xhci: use newUSB_RESUME_TIMEOUT
usb: host: ehci: use newUSB_RESUME_TIMEOUT
usb: host: uhci: use newUSB_RESUME_TIMEOUT
usb: musb: use newUSB_RESUME_TIMEOUT
usb: host: isp116x: use newUSB_RESUME_TIMEOUT
usb: host: fotg210: use newUSB_RESUME_TIMEOUT
usb: host: fusbh200: use newUSB_RESUME_TIMEOUT
usb: host: oxu210hp: use newUSB_RESUME_TIMEOUT
usb: host: r8a66597: use newUSB_RESUME_TIMEOUT
usb: host: sl811: use newUSB_RESUME_TIMEOUT
usb: dwc2: hcd: use newUSB_RESUME_TIMEOUT
usb: isp1760: hcd: use newUSB_RESUME_TIMEOUT
usb: core: hub: use newUSB_RESUME_TIMEOUTdrivers/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(-)Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlFrom
d4996890e535d0582cc845bbeaa75ad4de693d92Mon Sep 17 00:00:00 2001
From: Gregory Herrero <[email protected]>
Date: Fri, 3 Apr 2015 10:53:25 +0200
Subject: [PATCH] usb: dwc2: host: sleepUSB_RESUME_TIMEOUTduring resume
msleep(USB_RESUME_TIMEOUT)must be done when the controller drives the resume. This is true afterHPRT0_RESis written. Moreover, restore the delay after controller power is up.Signed-off-by Gregory Herrero <[email protected]>--- drivers/usb/dwc2/hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/usb/dwc2/hcd.c +2
-2@@ -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 );
Quoted 6 lines
drivers/usb/dwc2/hcd.c static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, · line 1546
Quoted 2 lines
drivers/usb/dwc2/hcd.c +0
-0hprt0 &= ~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
Quoted 117 lines · Greg KH
Quoted 109 lines · Felipe Balbi
Quoted 108 lines · Grégory Herrero
Hi Felipe,
Following patch: usb: dwc2: hcd: use new
USB_RESUME_TIMEOUTis 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 <[email protected]>:
Quoted 64 lines
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.gittags/usb-for-v4.1-part2for 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.1This 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 <[email protected]>----------------------------------------------------------------
Felipe Balbi (14):
usb: define a genericUSB_RESUME_TIMEOUTmacro
usb: host: xhci: use newUSB_RESUME_TIMEOUT
usb: host: ehci: use newUSB_RESUME_TIMEOUT
usb: host: uhci: use newUSB_RESUME_TIMEOUT
usb: musb: use newUSB_RESUME_TIMEOUT
usb: host: isp116x: use newUSB_RESUME_TIMEOUT
usb: host: fotg210: use newUSB_RESUME_TIMEOUT
usb: host: fusbh200: use newUSB_RESUME_TIMEOUT
usb: host: oxu210hp: use newUSB_RESUME_TIMEOUT
usb: host: r8a66597: use newUSB_RESUME_TIMEOUT
usb: host: sl811: use newUSB_RESUME_TIMEOUT
usb: dwc2: hcd: use newUSB_RESUME_TIMEOUT
usb: isp1760: hcd: use newUSB_RESUME_TIMEOUT
usb: core: hub: use newUSB_RESUME_TIMEOUTdrivers/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(-)Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlFrom
d4996890e535d0582cc845bbeaa75ad4de693d92Mon Sep 17 00:00:00 2001
From: Gregory Herrero <[email protected]>
Date: Fri, 3 Apr 2015 10:53:25 +0200
Subject: [PATCH] usb: dwc2: host: sleepUSB_RESUME_TIMEOUTduring resume
msleep(USB_RESUME_TIMEOUT)must be done when the controller drives the resume. This is true afterHPRT0_RESis written. Moreover, restore the delay after controller power is up.Signed-off-by Gregory Herrero <[email protected]>--- drivers/usb/dwc2/hcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/usb/dwc2/hcd.c +2
-2@@ -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 );Quoted 6 lines
drivers/usb/dwc2/hcd.c static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, · line 1546
Quoted 2 lines
drivers/usb/dwc2/hcd.c +0
-0hprt0 &= ~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 ?
Quoted 2 lines
I've taken your pull request and added this patch on top of it, so all should be good now.
Alright, thanks Greg.
Signature · 1 line
balbi