diff options
| author | augustss <augustss@NetBSD.org> | 1999-09-15 14:17:14 +0000 |
|---|---|---|
| committer | augustss <augustss@NetBSD.org> | 1999-09-15 14:17:14 +0000 |
| commit | e54df1b10c4e9beac1d6467c5b0e4ea552ab665e (patch) | |
| tree | e8f8d5955fcab80a75ebf98519e608ece858d583 /sys/dev/usb/usb.c | |
| parent | 60199e09b69107e945adb4acc4792ce79ae604bb (diff) | |
Handle the use_polling flag with a lttle more care and only set it if
we are cold booting.
Diffstat (limited to 'sys/dev/usb/usb.c')
| -rw-r--r-- | sys/dev/usb/usb.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index f3312048a10..0fdb3b75cf6 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -1,4 +1,4 @@ -/* $NetBSD: usb.c,v 1.22 1999/09/15 10:25:31 augustss Exp $ */ +/* $NetBSD: usb.c,v 1.23 1999/09/15 14:17:15 augustss Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -125,6 +125,9 @@ usbd_status usb_discover __P((struct usb_softc *)); void usb_create_event_thread __P((void *)); void usb_event_thread __P((void *)); +/* Flag to see if we are in the cold boot process. */ +extern int cold; + USB_DECLARE_DRIVER_INIT(usb, DEVMETHOD(bus_print_child, usbd_print_child)); USB_MATCH(usb) @@ -154,7 +157,8 @@ USB_ATTACH(usb) usbd_init(); sc->sc_bus = aux; sc->sc_bus->usbctl = sc; - sc->sc_bus->use_polling = 1; + if (cold) + sc->sc_bus->use_polling++; sc->sc_port.power = USB_MAX_POWER; r = usbd_new_device(USBDEV(sc->sc_dev), sc->sc_bus, 0,0,0, &sc->sc_port); @@ -174,7 +178,8 @@ USB_ATTACH(usb) USBDEVNAME(sc->sc_dev), r); sc->sc_dying = 1; } - sc->sc_bus->use_polling = 0; + if (cold) + sc->sc_bus->use_polling--; kthread_create(usb_create_event_thread, sc); |
