All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: echi-dbgp: increase the controller wait time to come out of halt.
@ 2012-07-30 15:06 Colin Ian King
  2012-07-31 13:09 ` Jason Wessel
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2012-07-30 15:06 UTC (permalink / raw)
  To: Jason Wessel, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, Colin Ian King

The default 10 microsecond delay for the controller to come out of
halt in dbgp_ehci_startup is too short, so increase it to 1 millisecond.

This is based on emperical testing on various USB debug ports on
modern machines such as a Lenovo X220i and an Ivybridge development
platform that needed to wait ~450-950 microseconds.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/usb/early/ehci-dbgp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/early/ehci-dbgp.c b/drivers/usb/early/ehci-dbgp.c
index ee0ebac..89dcf15 100644
--- a/drivers/usb/early/ehci-dbgp.c
+++ b/drivers/usb/early/ehci-dbgp.c
@@ -450,7 +450,7 @@ static int dbgp_ehci_startup(void)
 	writel(FLAG_CF, &ehci_regs->configured_flag);
 
 	/* Wait until the controller is no longer halted */
-	loop = 10;
+	loop = 1000;
 	do {
 		status = readl(&ehci_regs->status);
 		if (!(status & STS_HALT))
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] USB: echi-dbgp: increase the controller wait time to come out of halt.
  2012-07-30 15:06 [PATCH] USB: echi-dbgp: increase the controller wait time to come out of halt Colin Ian King
@ 2012-07-31 13:09 ` Jason Wessel
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Wessel @ 2012-07-31 13:09 UTC (permalink / raw)
  To: Colin Ian King; +Cc: Greg Kroah-Hartman, linux-usb, linux-kernel

On 07/30/2012 10:06 AM, Colin Ian King wrote:
> The default 10 microsecond delay for the controller to come out of
> halt in dbgp_ehci_startup is too short, so increase it to 1 millisecond.
>
> This is based on emperical testing on various USB debug ports on
> modern machines such as a Lenovo X220i and an Ivybridge development
> platform that needed to wait ~450-950 microseconds.

This seems fine to me.

I'll test it, merge it, and add a CC for -stable.

Thanks,
Jason.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-31 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-30 15:06 [PATCH] USB: echi-dbgp: increase the controller wait time to come out of halt Colin Ian King
2012-07-31 13:09 ` Jason Wessel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.