mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
nusb/usbd: use longer reset delay for rootports
Make reset delays more conservative: The usb spec says root ports need 50ms reset minimum, use 100ms. The usb spec says hub ports need 20ms minimum, use 50ms.
This commit is contained in:
parent
2f685dd96b
commit
d38dbf6415
2 changed files with 4 additions and 3 deletions
|
@ -56,8 +56,9 @@ enum
|
|||
Pconfigured,
|
||||
|
||||
/* Delays, timeouts (ms) */
|
||||
Resetdelay = 20, /* how much to wait after a reset */
|
||||
Resumedelay = 20, /* how much to wait after a resume */
|
||||
Rootresetdelay = 100, /* how much to wait after a root port reset (50ms by standard) */
|
||||
Portresetdelay = 50, /* how much to wait after a hub port reset (20ms by standard) */
|
||||
Resumedelay = 50, /* how much to wait after a resume (20ms by standard) */
|
||||
Powerdelay = 100, /* after powering up ports */
|
||||
Pollms = 250, /* port poll interval */
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ portattach(Hub *h, int p)
|
|||
dprint(2, "%s: %s: port %d: set reset: %r\n", argv0, d->dir, p);
|
||||
return -1;
|
||||
}
|
||||
sleep(Resetdelay);
|
||||
sleep(d->depth<0? Rootresetdelay: Portresetdelay);
|
||||
if((sts = portstatus(h, p)) == -1)
|
||||
return -1;
|
||||
sp = "full";
|
||||
|
|
Loading…
Reference in a new issue