1 /* $NetBSD: usb.c,v 1.68 2002/02/20 20:30:12 christos Exp $ */
3 /* Also already merged from NetBSD:
4 * $NetBSD: usb.c,v 1.70 2002/05/09 21:54:32 augustss Exp $
5 * $NetBSD: usb.c,v 1.71 2002/06/01 23:51:04 lukem Exp $
6 * $NetBSD: usb.c,v 1.73 2002/09/23 05:51:19 simonb Exp $
7 * $NetBSD: usb.c,v 1.80 2003/11/07 17:03:25 wiz Exp $
10 #include <sys/cdefs.h>
11 __FBSDID("$FreeBSD$");
14 * Copyright (c) 1998 The NetBSD Foundation, Inc.
15 * All rights reserved.
17 * This code is derived from software contributed to The NetBSD Foundation
18 * by Lennart Augustsson (lennart@augustsson.net) at
19 * Carlstedt Research & Technology.
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions
24 * 1. Redistributions of source code must retain the above copyright
25 * notice, this list of conditions and the following disclaimer.
26 * 2. Redistributions in binary form must reproduce the above copyright
27 * notice, this list of conditions and the following disclaimer in the
28 * documentation and/or other materials provided with the distribution.
29 * 3. All advertising materials mentioning features or use of this software
30 * must display the following acknowledgement:
31 * This product includes software developed by the NetBSD
32 * Foundation, Inc. and its contributors.
33 * 4. Neither the name of The NetBSD Foundation nor the names of its
34 * contributors may be used to endorse or promote products derived
35 * from this software without specific prior written permission.
37 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
38 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
39 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
40 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
41 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
43 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
44 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
45 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
47 * POSSIBILITY OF SUCH DAMAGE.
51 * USB specifications and other documentation can be found at
52 * http://www.usb.org/developers/docs/ and
53 * http://www.usb.org/developers/devclass_docs/
56 #include <sys/param.h>
57 #include <sys/systm.h>
58 #include <sys/kernel.h>
60 #include <sys/malloc.h>
61 #include <sys/mutex.h>
62 #include <sys/unistd.h>
63 #include <sys/module.h>
65 #include <sys/fcntl.h>
66 #include <sys/filio.h>
68 #include <sys/kthread.h>
72 #include <sys/selinfo.h>
73 #include <sys/signalvar.h>
74 #include <sys/sysctl.h>
77 #include <dev/usb/usb.h>
78 #include <dev/usb/usbdi.h>
79 #include <dev/usb/usbdi_util.h>
81 #define USBUNIT(d) (minor(d)) /* usb_discover device nodes, kthread */
82 #define USB_DEV_MINOR 255 /* event queue device */
84 MALLOC_DEFINE(M_USB, "USB", "USB");
85 MALLOC_DEFINE(M_USBDEV, "USBdev", "USB device");
86 MALLOC_DEFINE(M_USBHC, "USBHC", "USB host controller");
90 #include <machine/bus.h>
92 #include <dev/usb/usbdivar.h>
93 #include <dev/usb/usb_quirks.h>
95 /* Define this unconditionally in case a kernel module is loaded that
96 * has been compiled with debugging options.
98 SYSCTL_NODE(_hw, OID_AUTO, usb, CTLFLAG_RW, 0, "USB debugging");
101 #define DPRINTF(x) if (usbdebug) printf x
102 #define DPRINTFN(n,x) if (usbdebug>(n)) printf x
104 SYSCTL_INT(_hw_usb, OID_AUTO, debug, CTLFLAG_RW,
105 &usbdebug, 0, "usb debug level");
107 * 0 - do usual exploration
108 * 1 - do not use timeout exploration
109 * >1 - do no exploration
111 int usb_noexplore = 0;
114 #define DPRINTFN(n,x)
118 device_t sc_dev; /* base device */
119 struct cdev *sc_usbdev; /* /dev/usbN device */
120 TAILQ_ENTRY(usb_softc) sc_coldexplist; /* cold needs-explore list */
121 usbd_bus_handle sc_bus; /* USB controller */
122 struct usbd_port sc_port; /* dummy port for root hub */
124 struct proc *sc_event_thread;
130 TAILQ_HEAD(, usb_task) tasks;
131 struct proc *task_thread_proc;
133 int taskcreated; /* task thread exists. */
136 static struct usb_taskq usb_taskq[USB_NUM_TASKQS];
144 struct cdevsw usb_cdevsw = {
145 .d_version = D_VERSION,
146 .d_flags = D_NEEDGIANT,
155 static void usb_discover(void *);
156 static void usb_create_event_thread(void *);
157 static void usb_event_thread(void *);
158 static void usb_task_thread(void *);
160 static struct cdev *usb_dev; /* The /dev/usb device. */
161 static int usb_ndevs; /* Number of /dev/usbN devices. */
162 /* Busses to explore at the end of boot-time device configuration. */
163 static TAILQ_HEAD(, usb_softc) usb_coldexplist =
164 TAILQ_HEAD_INITIALIZER(usb_coldexplist);
166 #define USB_MAX_EVENTS 100
169 TAILQ_ENTRY(usb_event_q) next;
171 static TAILQ_HEAD(, usb_event_q) usb_events =
172 TAILQ_HEAD_INITIALIZER(usb_events);
173 static int usb_nevents = 0;
174 static struct selinfo usb_selevent;
175 static struct proc *usb_async_proc; /* process that wants USB SIGIO */
176 static int usb_dev_open = 0;
177 static void usb_add_event(int, struct usb_event *);
179 static int usb_get_next_event(struct usb_event *);
181 static const char *usbrev_str[] = USBREV_STR;
183 static device_probe_t usb_match;
184 static device_attach_t usb_attach;
185 static device_detach_t usb_detach;
186 static bus_child_detached_t usb_child_detached;
188 static device_method_t usb_methods[] = {
189 /* Device interface */
190 DEVMETHOD(device_probe, usb_match),
191 DEVMETHOD(device_attach, usb_attach),
192 DEVMETHOD(device_detach, usb_detach),
193 DEVMETHOD(device_suspend, bus_generic_suspend),
194 DEVMETHOD(device_resume, bus_generic_resume),
195 DEVMETHOD(device_shutdown, bus_generic_shutdown),
198 DEVMETHOD(bus_child_detached, usb_child_detached),
203 static driver_t usb_driver = {
206 sizeof(struct usb_softc)
209 static devclass_t usb_devclass;
211 DRIVER_MODULE(usb, ohci, usb_driver, usb_devclass, 0, 0);
212 DRIVER_MODULE(usb, uhci, usb_driver, usb_devclass, 0, 0);
213 DRIVER_MODULE(usb, ehci, usb_driver, usb_devclass, 0, 0);
214 DRIVER_MODULE(usb, slhci, usb_driver, usb_devclass, 0, 0);
215 MODULE_VERSION(usb, 1);
218 usb_match(device_t self)
220 DPRINTF(("usbd_match\n"));
221 return (UMATCH_GENERIC);
225 usb_attach(device_t self)
227 struct usb_softc *sc = device_get_softc(self);
228 void *aux = device_get_ivars(self);
229 usbd_device_handle dev;
237 DPRINTF(("usbd_attach\n"));
241 sc->sc_bus->usbctl = sc;
242 sc->sc_port.power = USB_MAX_POWER;
244 printf("%s", device_get_nameunit(sc->sc_dev));
245 usbrev = sc->sc_bus->usbrev;
246 printf(": USB revision %s", usbrev_str[usbrev]);
250 speed = USB_SPEED_FULL;
253 speed = USB_SPEED_HIGH;
256 printf(", not supported\n");
262 /* Make sure not to use tsleep() if we are cold booting. */
264 sc->sc_bus->use_polling++;
266 ue.u.ue_ctrlr.ue_bus = device_get_unit(sc->sc_dev);
267 usb_add_event(USB_EVENT_CTRLR_ATTACH, &ue);
269 #ifdef USB_USE_SOFTINTR
270 #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
271 /* XXX we should have our own level */
272 sc->sc_bus->soft = softintr_establish(IPL_SOFTNET,
273 sc->sc_bus->methods->soft_intr, sc->sc_bus);
274 if (sc->sc_bus->soft == NULL) {
275 printf("%s: can't register softintr\n", device_get_nameunit(sc->sc_dev));
280 usb_callout_init(sc->sc_bus->softi);
284 err = usbd_new_device(sc->sc_dev, sc->sc_bus, 0, speed, 0,
287 dev = sc->sc_port.device;
288 if (dev->hub == NULL) {
290 printf("%s: root device is not a hub\n",
291 device_get_nameunit(sc->sc_dev));
294 sc->sc_bus->root_hub = dev;
297 * Turning this code off will delay attachment of USB devices
298 * until the USB event thread is running, which means that
299 * the keyboard will not work until after cold boot.
302 /* Explore high-speed busses before others. */
303 if (speed == USB_SPEED_HIGH)
304 dev->hub->explore(sc->sc_bus->root_hub);
306 TAILQ_INSERT_TAIL(&usb_coldexplist, sc,
311 printf("%s: root hub problem, error=%d\n",
312 device_get_nameunit(sc->sc_dev), err);
316 sc->sc_bus->use_polling--;
318 /* XXX really do right config_pending_incr(); */
319 usb_create_event_thread(sc);
320 /* The per controller devices (used for usb_discover) */
321 /* XXX This is redundant now, but old usbd's will want it */
322 sc->sc_usbdev = make_dev(&usb_cdevsw, device_get_unit(self), UID_ROOT,
323 GID_OPERATOR, 0660, "usb%d", device_get_unit(self));
324 if (usb_ndevs++ == 0) {
325 /* The device spitting out events */
326 usb_dev = make_dev(&usb_cdevsw, USB_DEV_MINOR, UID_ROOT,
327 GID_OPERATOR, 0660, "usb");
332 static const char *taskq_names[] = USB_TASKQ_NAMES;
335 usb_create_event_thread(void *arg)
337 struct usb_softc *sc = arg;
338 struct usb_taskq *taskq;
341 if (kthread_create(usb_event_thread, sc, &sc->sc_event_thread,
342 RFHIGHPID, 0, device_get_nameunit(sc->sc_dev))) {
343 printf("%s: unable to create event thread for\n",
344 device_get_nameunit(sc->sc_dev));
345 panic("usb_create_event_thread");
347 for (i = 0; i < USB_NUM_TASKQS; i++) {
348 taskq = &usb_taskq[i];
350 if (taskq->taskcreated == 0) {
351 taskq->taskcreated = 1;
352 taskq->name = taskq_names[i];
353 TAILQ_INIT(&taskq->tasks);
354 if (kthread_create(usb_task_thread, taskq,
355 &taskq->task_thread_proc, RFHIGHPID, 0,
357 printf("unable to create task thread\n");
358 panic("usb_create_event_thread task");
365 * Add a task to be performed by the task thread. This function can be
366 * called from any context and the task will be executed in a process
370 usb_add_task(usbd_device_handle dev, struct usb_task *task, int queue)
372 struct usb_taskq *taskq;
376 taskq = &usb_taskq[queue];
377 if (task->queue == -1) {
378 DPRINTFN(2,("usb_add_task: task=%p\n", task));
379 TAILQ_INSERT_TAIL(&taskq->tasks, task, next);
382 DPRINTFN(3,("usb_add_task: task=%p on q\n", task));
384 wakeup(&taskq->tasks);
389 usb_rem_task(usbd_device_handle dev, struct usb_task *task)
391 struct usb_taskq *taskq;
395 if (task->queue != -1) {
396 taskq = &usb_taskq[task->queue];
397 TAILQ_REMOVE(&taskq->tasks, task, next);
404 usb_event_thread(void *arg)
406 static int newthread_wchan;
407 struct usb_softc *sc = arg;
411 DPRINTF(("usb_event_thread: start\n"));
414 * In case this controller is a companion controller to an
415 * EHCI controller we need to wait until the EHCI controller
416 * has grabbed the port. What we do here is wait until no new
417 * USB threads have been created in a while. XXX we actually
418 * just want to wait for the PCI slot to be fully scanned.
420 * Note that when you `kldload usb' it actually attaches the
421 * devices in order that the drivers appear in the kld, not the
422 * normal PCI order, since the addition of each driver within
423 * usb.ko (ohci, ehci etc.) causes a separate PCI bus re-scan.
425 wakeup(&newthread_wchan);
427 if (tsleep(&newthread_wchan , PWAIT, "usbets", hz * 4) != 0)
431 /* Make sure first discover does something. */
432 sc->sc_bus->needs_explore = 1;
434 /* XXX really do right config_pending_decr(); */
436 while (!sc->sc_dying) {
438 if (usb_noexplore < 2)
442 (void)tsleep(&sc->sc_bus->needs_explore, PWAIT, "usbevt",
443 usb_noexplore ? 0 : hz * 60);
445 (void)tsleep(&sc->sc_bus->needs_explore, PWAIT, "usbevt",
448 DPRINTFN(2,("usb_event_thread: woke up\n"));
450 sc->sc_event_thread = NULL;
452 /* In case parent is waiting for us to exit. */
455 DPRINTF(("usb_event_thread: exit\n"));
460 usb_task_thread(void *arg)
462 struct usb_task *task;
463 struct usb_taskq *taskq;
469 DPRINTF(("usb_task_thread: start taskq %s\n", taskq->name));
472 while (usb_ndevs > 0) {
473 task = TAILQ_FIRST(&taskq->tasks);
475 tsleep(&taskq->tasks, PWAIT, "usbtsk", 0);
476 task = TAILQ_FIRST(&taskq->tasks);
478 DPRINTFN(2,("usb_task_thread: woke up task=%p\n", task));
480 TAILQ_REMOVE(&taskq->tasks, task, next);
483 task->fun(task->arg);
489 taskq->taskcreated = 0;
490 wakeup(&taskq->taskcreated);
492 DPRINTF(("usb_event_thread: exit\n"));
497 usbopen(struct cdev *dev, int flag, int mode, struct thread *p)
499 int unit = USBUNIT(dev);
500 struct usb_softc *sc;
502 if (unit == USB_DEV_MINOR) {
509 sc = devclass_get_softc(usb_devclass, unit);
519 usbread(struct cdev *dev, struct uio *uio, int flag)
522 int unit = USBUNIT(dev);
525 if (unit != USB_DEV_MINOR)
528 if (uio->uio_resid != sizeof(struct usb_event))
534 n = usb_get_next_event(&ue);
537 if (flag & O_NONBLOCK) {
541 error = tsleep(&usb_events, PZERO | PCATCH, "usbrea", 0);
547 error = uiomove((void *)&ue, uio->uio_resid, uio);
553 usbclose(struct cdev *dev, int flag, int mode, struct thread *p)
555 int unit = USBUNIT(dev);
557 if (unit == USB_DEV_MINOR) {
566 usbioctl(struct cdev *devt, u_long cmd, caddr_t data, int flag, struct thread *p)
568 struct usb_softc *sc;
569 int unit = USBUNIT(devt);
571 if (unit == USB_DEV_MINOR) {
574 /* All handled in the upper FS layer. */
579 usb_async_proc = p->td_proc;
588 sc = devclass_get_softc(usb_devclass, unit);
593 /* This part should be deleted */
598 struct usb_ctl_request *ur = (void *)data;
599 int len = UGETW(ur->ucr_request.wLength);
603 int addr = ur->ucr_addr;
607 DPRINTF(("usbioctl: USB_REQUEST addr=%d len=%d\n", addr, len));
608 if (len < 0 || len > 32768)
610 if (addr < 0 || addr >= USB_MAX_DEVICES ||
611 sc->sc_bus->devices[addr] == 0)
614 iov.iov_base = (caddr_t)ur->ucr_data;
620 uio.uio_segflg = UIO_USERSPACE;
622 ur->ucr_request.bmRequestType & UT_READ ?
623 UIO_READ : UIO_WRITE;
625 ptr = malloc(len, M_TEMP, M_WAITOK);
626 if (uio.uio_rw == UIO_WRITE) {
627 error = uiomove(ptr, len, &uio);
632 err = usbd_do_request_flags(sc->sc_bus->devices[addr],
633 &ur->ucr_request, ptr, ur->ucr_flags, &ur->ucr_actlen,
634 USBD_DEFAULT_TIMEOUT);
640 if (uio.uio_rw == UIO_READ) {
641 error = uiomove(ptr, len, &uio);
654 struct usb_device_info *di = (void *)data;
655 int addr = di->udi_addr;
656 usbd_device_handle dev;
658 if (addr < 1 || addr >= USB_MAX_DEVICES)
660 dev = sc->sc_bus->devices[addr];
663 usbd_fill_deviceinfo(dev, di, 1);
667 case USB_DEVICESTATS:
668 *(struct usb_device_stats *)data = sc->sc_bus->stats;
678 usbpoll(struct cdev *dev, int events, struct thread *p)
680 int revents, mask, s;
681 int unit = USBUNIT(dev);
683 if (unit == USB_DEV_MINOR) {
685 mask = POLLIN | POLLRDNORM;
688 if (events & mask && usb_nevents > 0)
689 revents |= events & mask;
690 if (revents == 0 && events & mask)
691 selrecord(p, &usb_selevent);
696 return (0); /* select/poll never wakes up - back compat */
700 /* Explore device tree from the root. */
702 usb_discover(void *v)
704 struct usb_softc *sc = v;
706 /* splxxx should be changed to mutexes for preemption safety some day */
709 DPRINTFN(2,("usb_discover\n"));
711 if (usb_noexplore > 1)
716 * We need mutual exclusion while traversing the device tree,
717 * but this is guaranteed since this function is only called
718 * from the event thread for the controller.
721 while (sc->sc_bus->needs_explore && !sc->sc_dying) {
722 sc->sc_bus->needs_explore = 0;
724 sc->sc_bus->root_hub->hub->explore(sc->sc_bus->root_hub);
731 usb_needs_explore(usbd_device_handle dev)
733 DPRINTFN(2,("usb_needs_explore\n"));
734 dev->bus->needs_explore = 1;
735 wakeup(&dev->bus->needs_explore);
738 /* Called at splusb() */
740 usb_get_next_event(struct usb_event *ue)
742 struct usb_event_q *ueq;
744 if (usb_nevents <= 0)
746 ueq = TAILQ_FIRST(&usb_events);
749 printf("usb: usb_nevents got out of sync! %d\n", usb_nevents);
755 TAILQ_REMOVE(&usb_events, ueq, next);
762 usbd_add_dev_event(int type, usbd_device_handle udev)
766 usbd_fill_deviceinfo(udev, &ue.u.ue_device, USB_EVENT_IS_ATTACH(type));
767 usb_add_event(type, &ue);
771 usbd_add_drv_event(int type, usbd_device_handle udev, device_t dev)
775 ue.u.ue_driver.ue_cookie = udev->cookie;
776 strncpy(ue.u.ue_driver.ue_devname, device_get_nameunit(dev),
777 sizeof ue.u.ue_driver.ue_devname);
778 usb_add_event(type, &ue);
782 usb_add_event(int type, struct usb_event *uep)
784 struct usb_event_q *ueq;
786 struct timeval thetime;
789 ueq = malloc(sizeof *ueq, M_USBDEV, M_WAITOK);
791 ueq->ue.ue_type = type;
793 TIMEVAL_TO_TIMESPEC(&thetime, &ueq->ue.ue_time);
796 if (USB_EVENT_IS_DETACH(type)) {
797 struct usb_event_q *ueqi, *ueqi_next;
799 for (ueqi = TAILQ_FIRST(&usb_events); ueqi; ueqi = ueqi_next) {
800 ueqi_next = TAILQ_NEXT(ueqi, next);
801 if (ueqi->ue.u.ue_driver.ue_cookie.cookie ==
802 uep->u.ue_device.udi_cookie.cookie) {
803 TAILQ_REMOVE(&usb_events, ueqi, next);
804 free(ueqi, M_USBDEV);
806 ueqi_next = TAILQ_FIRST(&usb_events);
810 if (usb_nevents >= USB_MAX_EVENTS) {
811 /* Too many queued events, drop an old one. */
812 DPRINTF(("usb: event dropped\n"));
813 (void)usb_get_next_event(&ue);
815 TAILQ_INSERT_TAIL(&usb_events, ueq, next);
818 selwakeuppri(&usb_selevent, PZERO);
819 if (usb_async_proc != NULL) {
820 PROC_LOCK(usb_async_proc);
821 psignal(usb_async_proc, SIGIO);
822 PROC_UNLOCK(usb_async_proc);
828 usb_schedsoftintr(usbd_bus_handle bus)
830 DPRINTFN(10,("usb_schedsoftintr: polling=%d\n", bus->use_polling));
831 #ifdef USB_USE_SOFTINTR
832 if (bus->use_polling) {
833 bus->methods->soft_intr(bus);
835 #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
836 softintr_schedule(bus->soft);
838 if (!callout_pending(&bus->softi))
839 callout_reset(&bus->softi, 0, bus->methods->soft_intr,
841 #endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
844 bus->methods->soft_intr(bus);
845 #endif /* USB_USE_SOFTINTR */
849 usb_detach(device_t self)
851 struct usb_softc *sc = device_get_softc(self);
853 struct usb_taskq *taskq;
856 DPRINTF(("usb_detach: start\n"));
860 /* Make all devices disconnect. */
861 if (sc->sc_port.device != NULL)
862 usb_disconnect_port(&sc->sc_port, self);
864 /* Kill off event thread. */
865 if (sc->sc_event_thread != NULL) {
866 wakeup(&sc->sc_bus->needs_explore);
867 if (tsleep(sc, PWAIT, "usbdet", hz * 60))
868 printf("%s: event thread didn't die\n",
869 device_get_nameunit(sc->sc_dev));
870 DPRINTF(("usb_detach: event thread dead\n"));
873 destroy_dev(sc->sc_usbdev);
874 if (--usb_ndevs == 0) {
875 destroy_dev(usb_dev);
877 for (i = 0; i < USB_NUM_TASKQS; i++) {
878 taskq = &usb_taskq[i];
879 wakeup(&taskq->tasks);
880 if (tsleep(&taskq->taskcreated, PWAIT, "usbtdt",
882 printf("usb task thread %s didn't die\n",
890 #ifdef USB_USE_SOFTINTR
891 #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
892 if (sc->sc_bus->soft != NULL) {
893 softintr_disestablish(sc->sc_bus->soft);
894 sc->sc_bus->soft = NULL;
897 callout_stop(&sc->sc_bus->softi);
901 ue.u.ue_ctrlr.ue_bus = device_get_unit(sc->sc_dev);
902 usb_add_event(USB_EVENT_CTRLR_DETACH, &ue);
908 usb_child_detached(device_t self, device_t child)
910 struct usb_softc *sc = device_get_softc(self);
912 /* XXX, should check it is the right device. */
913 sc->sc_port.device = NULL;
916 /* Explore USB busses at the end of device configuration. */
918 usb_cold_explore(void *arg)
920 struct usb_softc *sc;
922 KASSERT(cold || TAILQ_EMPTY(&usb_coldexplist),
923 ("usb_cold_explore: busses to explore when !cold"));
924 while (!TAILQ_EMPTY(&usb_coldexplist)) {
925 sc = TAILQ_FIRST(&usb_coldexplist);
926 TAILQ_REMOVE(&usb_coldexplist, sc, sc_coldexplist);
928 sc->sc_bus->use_polling++;
929 sc->sc_port.device->hub->explore(sc->sc_bus->root_hub);
930 sc->sc_bus->use_polling--;
934 SYSINIT(usb_cold_explore, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE,
935 usb_cold_explore, NULL);