Don't use tsleep when cold booting. It is called before bus->use_polling
is initialised by usb_init. This might solve problems with some controllers not being initiliased properly, because a delay was effectively a tsleep that returned immediately. Approved by: jhk
This commit is contained in:
parent
61f262d00f
commit
f07fcd07c8
@ -302,7 +302,7 @@ usb_delay_ms(bus, ms)
|
||||
u_int ms;
|
||||
{
|
||||
/* Wait at least two clock ticks so we know the time has passed. */
|
||||
if (bus->use_polling)
|
||||
if (bus->use_polling || cold)
|
||||
delay((ms+1) * 1000);
|
||||
else
|
||||
tsleep(&ms, PRIBIO, "usbdly", (ms*hz+999)/1000 + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user