diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-08-30 16:00:03 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-08-30 16:00:03 +0200 |
commit | f104cc9d79940e4f2c15ceaafa765a3cc94c817f (patch) | |
tree | 586b9e8cfc799ba343f30c48d91c79cbc16961c8 /sys/src/9/port/usbehci.c | |
parent | f459320bb495060d0b85b975530e87ce6dc43c1d (diff) |
usbehci: portreset timing
assert port reset for 50ms, not 10ms.
Diffstat (limited to 'sys/src/9/port/usbehci.c')
-rw-r--r-- | sys/src/9/port/usbehci.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/src/9/port/usbehci.c b/sys/src/9/port/usbehci.c index 19732dac6..0cdffb750 100644 --- a/sys/src/9/port/usbehci.c +++ b/sys/src/9/port/usbehci.c @@ -1692,19 +1692,20 @@ portreset(Hci *hp, int port, int on) ctlr->capio); *portscp = (*portscp & ~Psenable) | Psreset; /* initiate reset */ - delay(10); - *portscp &= ~Psreset; - /* * usb 2 spec: reset must finish within 20 ms. * linux says spec says it can take 50 ms. for hubs. */ + delay(50); + *portscp &= ~Psreset; /* terminate reset */ + delay(10); for(i = 0; *portscp & Psreset && i < 10; i++) delay(10); + if (*portscp & Psreset) - iprint("ehci %#p: port %d didn't reset within %d ms; sts %#lux\n", - ctlr->capio, port, i * 10, *portscp); + iprint("ehci %#p: port %d didn't reset; sts %#lux\n", + ctlr->capio, port, *portscp); delay(10); /* ehci spec: enable within 2 ms. */ if((*portscp & Psenable) == 0) |