1ms seems to short on my chromebook, increasing that to 5ms makes EHCI work.
Signed-off-by: Sven Schnelle svens@stackframe.org --- src/usb-ehci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/usb-ehci.c b/src/usb-ehci.c index 3c0be13..b53caa1 100644 --- a/src/usb-ehci.c +++ b/src/usb-ehci.c @@ -82,7 +82,7 @@ ehci_hub_detect(struct usbhub_s *hub, u32 port) writel(portreg, portsc); msleep(EHCI_TIME_POSTPOWER); } else { - msleep(1); // XXX - time for connect to be detected. + msleep(5); // XXX - time for connect to be detected. } portsc = readl(portreg);
On Sun, Jul 29, 2012 at 09:51:14PM +0200, Sven Schnelle wrote:
1ms seems to short on my chromebook, increasing that to 5ms makes EHCI work.
Thanks. Why not go to 20ms - how about the below instead?
-Kevin
--- a/src/usb-ehci.c +++ b/src/usb-ehci.c @@ -82,7 +82,9 @@ ehci_hub_detect(struct usbhub_s *hub, u32 port) writel(portreg, portsc); msleep(EHCI_TIME_POSTPOWER); } else { - msleep(1); // XXX - time for connect to be detected. + // Port is already powered up, but we don't know how long it + // has been powered up, so wait the 20ms. + msleep(EHCI_TIME_POSTPOWER); } portsc = readl(portreg);
Kevin O'Connor kevin@koconnor.net writes:
On Sun, Jul 29, 2012 at 09:51:14PM +0200, Sven Schnelle wrote:
1ms seems to short on my chromebook, increasing that to 5ms makes EHCI work.
Thanks. Why not go to 20ms - how about the below instead?
msleep(1); // XXX - time for connect to be detected.
// Port is already powered up, but we don't know how long it
// has been powered up, so wait the 20ms.
msleep(EHCI_TIME_POSTPOWER);
Feel free to use that, no objections from my side.
Regards Sven.