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:
Nick Hibma 2000-02-06 14:59:00 +00:00
parent 16422b76f1
commit 3a119ee1e2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57011

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