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:
n_hibma 2000-02-06 14:59:00 +00:00
parent 61f262d00f
commit f07fcd07c8

View File

@ -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);