Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Make sure to use delay() in usb_delay_ms() while...



details:   https://anonhg.NetBSD.org/src/rev/e38adf58a8b8
branches:  trunk
changeset: 481534:e38adf58a8b8
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Feb 01 17:46:17 2000 +0000

description:
Make sure to use delay() in usb_delay_ms() while cold booting.

diffstat:

 sys/dev/usb/usb_subr.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r c52328e32a85 -r e38adf58a8b8 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c    Tue Feb 01 13:59:34 2000 +0000
+++ b/sys/dev/usb/usb_subr.c    Tue Feb 01 17:46:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_subr.c,v 1.63 2000/01/19 00:23:58 augustss Exp $   */
+/*     $NetBSD: usb_subr.c,v 1.64 2000/02/01 17:46:17 augustss Exp $   */
 /*     $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $   */
 
 /*
@@ -301,8 +301,10 @@
        usbd_bus_handle bus;
        u_int ms;
 {
+       extern int cold;
+
        /* 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);



Home | Main Index | Thread Index | Old Index