summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>2000-02-06 14:59:00 +0000
committern_hibma <n_hibma@FreeBSD.org>2000-02-06 14:59:00 +0000
commitf07fcd07c83ee4fe5d1cc4d85cdf51d299182d28 (patch)
tree280a285568d3022a639653e0bed8b87db3241702 /sys/dev
parent61f262d00f5b757548dd48830be95188c4a063d4 (diff)
downloadFreeBSD-src-f07fcd07c83ee4fe5d1cc4d85cdf51d299182d28.zip
FreeBSD-src-f07fcd07c83ee4fe5d1cc4d85cdf51d299182d28.tar.gz
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
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/usb_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index 5ac7b95..a1bb06c 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);
OpenPOWER on IntegriCloud