Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Use config_pending.



details:   https://anonhg.NetBSD.org/src/rev/a9996b3d0fb0
branches:  trunk
changeset: 481202:a9996b3d0fb0
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Jan 24 18:35:51 2000 +0000

description:
Use config_pending.

diffstat:

 sys/dev/usb/usb.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (36 lines):

diff -r 950bf89d47cc -r a9996b3d0fb0 sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Mon Jan 24 18:34:44 2000 +0000
+++ b/sys/dev/usb/usb.c Mon Jan 24 18:35:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb.c,v 1.36 1999/12/22 23:54:09 augustss Exp $        */
+/*     $NetBSD: usb.c,v 1.37 2000/01/24 18:35:51 thorpej Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/usb.c,v 1.20 1999/11/17 22:33:46 n_hibma Exp $        */
 
 /*
@@ -243,6 +243,7 @@
        if (cold)
                sc->sc_bus->use_polling--;
 
+       config_pending_incr();
        kthread_create(usb_create_event_thread, sc);
 
 #if defined(__FreeBSD__)
@@ -273,6 +274,7 @@
        void *arg;
 {
        struct usb_softc *sc = arg;
+       int first = 1;
 
        DPRINTF(("usb_event_thread: start\n"));
 
@@ -281,6 +283,10 @@
                if (usb_noexplore < 2)
 #endif
                usb_discover(sc);
+               if (first) {
+                       config_pending_decr();
+                       first = 0;
+               }
                (void)tsleep(&sc->sc_bus->needs_explore, PWAIT, "usbevt",
 #ifdef USB_DEBUG
                             usb_noexplore ? 0 :



Home | Main Index | Thread Index | Old Index