From 3a119ee1e20e1b6d04b98fce6f930a988a318a31 Mon Sep 17 00:00:00 2001 From: Nick Hibma Date: Sun, 6 Feb 2000 14:59:00 +0000 Subject: [PATCH] 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 --- sys/dev/usb/usb_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 5ac7b95691a4..a1bb06c5943d 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -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);