Re: [PATCH 04/13] usb: host: uhci: use new USB_RESUME_TIMEOUT
On Fri, Feb 13, 2015 at 03:38:04PM -0600, Felipe Balbi wrote: On Fri, Feb 13, 2015 at 04:30:15PM -0500, Alan Stern wrote: On Fri, 13 Feb 2015, Felipe Balbi wrote: Make sure we're using the new macro, so our resume signaling will always pass certification. Signed-off-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/uhci-hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c index 93e17b12fb33..fd809e2cace1 100644 --- a/drivers/usb/host/uhci-hub.c +++ b/drivers/usb/host/uhci-hub.c @@ -165,7 +165,7 @@ static void uhci_check_ports(struct uhci_hcd *uhci) /* Port received a wakeup request */ set_bit(port, uhci-resuming_ports); uhci-ports_timeout = jiffies + - msecs_to_jiffies(25); + msecs_to_jiffies(USB_RESUME_TIMEOUT); usb_hcd_start_port_resume( uhci_to_hcd(uhci)-self, port); You missed a second occurrence in uhci_hub_control(): else /* USB v2.0 7.1.7.7 */ uhci-ports_timeout = jiffies + msecs_to_jiffies(20); fixed: and I've added a patch to hub.c too: commit 314fa03c55a333552178e57008609ed3b2f06415 Author: Felipe Balbi ba...@ti.com Date: Fri Feb 13 15:38:33 2015 -0600 usb: core: hub: use new USB_RESUME_TIMEOUT Make sure we're using the new macro, so our resume signaling will always pass certification. Signed-off-by: Felipe Balbi ba...@ti.com diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index d7c3d5a35946..3b7151687776 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -3406,10 +3406,10 @@ int usb_port_resume(struct usb_device *udev, pm_message_t msg) if (status) { dev_dbg(port_dev-dev, can't resume, status %d\n, status); } else { - /* drive resume for at least 20 msec */ + /* drive resume for USB_RESUME_TIMEOUT msec */ dev_dbg(udev-dev, usb %sresume\n, (PMSG_IS_AUTO(msg) ? auto- : )); - msleep(25); + msleep(USB_RESUME_TIMEOUT); /* Virtual root hubs can trigger on GET_PORT_STATUS to * stop resume signaling. Then finish the resume I'll wait until Monday or Tuesday for more comments before resending. All patches are available on my k.org account if anybody wants to test: git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git usb-generic-resume-timeout -- balbi signature.asc Description: Digital signature
[PATCH 04/13] usb: host: uhci: use new USB_RESUME_TIMEOUT
Make sure we're using the new macro, so our resume signaling will always pass certification. Signed-off-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/uhci-hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c index 93e17b12fb33..fd809e2cace1 100644 --- a/drivers/usb/host/uhci-hub.c +++ b/drivers/usb/host/uhci-hub.c @@ -165,7 +165,7 @@ static void uhci_check_ports(struct uhci_hcd *uhci) /* Port received a wakeup request */ set_bit(port, uhci-resuming_ports); uhci-ports_timeout = jiffies + - msecs_to_jiffies(25); + msecs_to_jiffies(USB_RESUME_TIMEOUT); usb_hcd_start_port_resume( uhci_to_hcd(uhci)-self, port); -- 2.3.0 -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 04/13] usb: host: uhci: use new USB_RESUME_TIMEOUT
On Fri, 13 Feb 2015, Felipe Balbi wrote: Make sure we're using the new macro, so our resume signaling will always pass certification. Signed-off-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/uhci-hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c index 93e17b12fb33..fd809e2cace1 100644 --- a/drivers/usb/host/uhci-hub.c +++ b/drivers/usb/host/uhci-hub.c @@ -165,7 +165,7 @@ static void uhci_check_ports(struct uhci_hcd *uhci) /* Port received a wakeup request */ set_bit(port, uhci-resuming_ports); uhci-ports_timeout = jiffies + - msecs_to_jiffies(25); + msecs_to_jiffies(USB_RESUME_TIMEOUT); usb_hcd_start_port_resume( uhci_to_hcd(uhci)-self, port); You missed a second occurrence in uhci_hub_control(): else /* USB v2.0 7.1.7.7 */ uhci-ports_timeout = jiffies + msecs_to_jiffies(20); Alan Stern -- To unsubscribe from this list: send the line unsubscribe linux-usb in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 04/13] usb: host: uhci: use new USB_RESUME_TIMEOUT
On Fri, Feb 13, 2015 at 04:30:15PM -0500, Alan Stern wrote: On Fri, 13 Feb 2015, Felipe Balbi wrote: Make sure we're using the new macro, so our resume signaling will always pass certification. Signed-off-by: Felipe Balbi ba...@ti.com --- drivers/usb/host/uhci-hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c index 93e17b12fb33..fd809e2cace1 100644 --- a/drivers/usb/host/uhci-hub.c +++ b/drivers/usb/host/uhci-hub.c @@ -165,7 +165,7 @@ static void uhci_check_ports(struct uhci_hcd *uhci) /* Port received a wakeup request */ set_bit(port, uhci-resuming_ports); uhci-ports_timeout = jiffies + - msecs_to_jiffies(25); + msecs_to_jiffies(USB_RESUME_TIMEOUT); usb_hcd_start_port_resume( uhci_to_hcd(uhci)-self, port); You missed a second occurrence in uhci_hub_control(): else /* USB v2.0 7.1.7.7 */ uhci-ports_timeout = jiffies + msecs_to_jiffies(20); fixed: commit 9b0fd8b46f4621257ee42bd89d58ca41c12e0a91 Author: Felipe Balbi ba...@ti.com Date: Fri Feb 13 14:44:17 2015 -0600 usb: host: uhci: use new USB_RESUME_TIMEOUT Make sure we're using the new macro, so our resume signaling will always pass certification. Signed-off-by: Felipe Balbi ba...@ti.com diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c index 19ba5eafb31e..7b3d1afcc14a 100644 --- a/drivers/usb/host/uhci-hub.c +++ b/drivers/usb/host/uhci-hub.c @@ -166,7 +166,7 @@ static void uhci_check_ports(struct uhci_hcd *uhci) /* Port received a wakeup request */ set_bit(port, uhci-resuming_ports); uhci-ports_timeout = jiffies + - msecs_to_jiffies(25); + msecs_to_jiffies(USB_RESUME_TIMEOUT); usb_hcd_start_port_resume( uhci_to_hcd(uhci)-self, port); @@ -338,7 +338,8 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, uhci_finish_suspend(uhci, port, port_addr); /* USB v2.0 7.1.7.5 */ - uhci-ports_timeout = jiffies + msecs_to_jiffies(50); + uhci-ports_timeout = jiffies + + msecs_to_jiffies(USB_RESUME_TIMEOUT); break; case USB_PORT_FEAT_POWER: /* UHCI has no power switching */ -- balbi signature.asc Description: Digital signature