2002-01-24 20:21:17 +00:00
|
|
|
/* $NetBSD: usb.c,v 1.37 2000/01/24 18:35:51 thorpej Exp $ */
|
1999-01-13 01:09:14 +00:00
|
|
|
/* $FreeBSD$ */
|
1998-11-26 23:13:13 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
1999-01-07 23:07:57 +00:00
|
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
2000-05-14 16:43:10 +00:00
|
|
|
* by Lennart Augustsson (lennart@augustsson.net) at
|
1999-01-07 23:07:57 +00:00
|
|
|
* Carlstedt Research & Technology.
|
1998-11-26 23:13:13 +00:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
|
|
* must display the following acknowledgement:
|
|
|
|
* This product includes software developed by the NetBSD
|
|
|
|
* Foundation, Inc. and its contributors.
|
|
|
|
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
1999-01-07 23:07:57 +00:00
|
|
|
* USB specifications and other documentation can be found at
|
|
|
|
* http://www.usb.org/developers/data/ and
|
|
|
|
* http://www.usb.org/developers/index.html .
|
1998-11-26 23:13:13 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/systm.h>
|
|
|
|
#include <sys/kernel.h>
|
2001-05-01 08:13:21 +00:00
|
|
|
#include <sys/lock.h>
|
1998-11-26 23:13:13 +00:00
|
|
|
#include <sys/malloc.h>
|
2001-05-01 08:13:21 +00:00
|
|
|
#include <sys/mutex.h>
|
1999-10-07 19:26:38 +00:00
|
|
|
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
1998-11-26 23:13:13 +00:00
|
|
|
#include <sys/device.h>
|
1999-01-07 23:07:57 +00:00
|
|
|
#elif defined(__FreeBSD__)
|
2001-06-06 22:00:03 +00:00
|
|
|
#include <sys/unistd.h>
|
1998-11-26 23:13:13 +00:00
|
|
|
#include <sys/module.h>
|
|
|
|
#include <sys/bus.h>
|
1999-11-17 22:33:51 +00:00
|
|
|
#include <sys/filio.h>
|
1998-11-26 23:13:13 +00:00
|
|
|
#include <sys/uio.h>
|
|
|
|
#endif
|
2002-01-02 23:31:08 +00:00
|
|
|
#include <sys/kthread.h>
|
2001-03-07 03:37:06 +00:00
|
|
|
#include <sys/proc.h>
|
1999-11-17 22:33:51 +00:00
|
|
|
#include <sys/conf.h>
|
1998-11-26 23:13:13 +00:00
|
|
|
#include <sys/poll.h>
|
2001-01-09 04:33:49 +00:00
|
|
|
#if __FreeBSD_version >= 500014
|
|
|
|
#include <sys/selinfo.h>
|
|
|
|
#else
|
1998-11-26 23:13:13 +00:00
|
|
|
#include <sys/select.h>
|
2001-01-09 04:33:49 +00:00
|
|
|
#endif
|
1999-11-17 22:33:51 +00:00
|
|
|
#include <sys/vnode.h>
|
|
|
|
#include <sys/signalvar.h>
|
1998-11-26 23:13:13 +00:00
|
|
|
|
|
|
|
#include <dev/usb/usb.h>
|
1999-10-07 19:26:38 +00:00
|
|
|
#include <dev/usb/usbdi.h>
|
|
|
|
#include <dev/usb/usbdi_util.h>
|
1998-11-26 23:13:13 +00:00
|
|
|
|
1999-11-19 13:13:28 +00:00
|
|
|
#define USBUNIT(d) (minor(d)) /* usb_discover device nodes, kthread */
|
|
|
|
#define USB_DEV_MINOR 255 /* event queue device */
|
1999-11-17 22:33:51 +00:00
|
|
|
|
1998-11-26 23:13:13 +00:00
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
MALLOC_DEFINE(M_USB, "USB", "USB");
|
|
|
|
MALLOC_DEFINE(M_USBDEV, "USBdev", "USB device");
|
1999-10-07 19:26:38 +00:00
|
|
|
MALLOC_DEFINE(M_USBHC, "USBHC", "USB host controller");
|
1999-01-07 23:07:57 +00:00
|
|
|
|
|
|
|
#include "usb_if.h"
|
|
|
|
#endif /* defined(__FreeBSD__) */
|
1998-11-26 23:13:13 +00:00
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
#include <machine/bus.h>
|
|
|
|
|
1998-11-26 23:13:13 +00:00
|
|
|
#include <dev/usb/usbdivar.h>
|
|
|
|
#include <dev/usb/usb_quirks.h>
|
|
|
|
|
|
|
|
#ifdef USB_DEBUG
|
1999-04-11 20:50:33 +00:00
|
|
|
#define DPRINTF(x) if (usbdebug) logprintf x
|
|
|
|
#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x
|
1999-10-07 19:26:38 +00:00
|
|
|
int usbdebug = 0;
|
1999-11-17 22:33:51 +00:00
|
|
|
#ifdef UHCI_DEBUG
|
|
|
|
extern int uhcidebug;
|
|
|
|
#endif
|
|
|
|
#ifdef OHCI_DEBUG
|
|
|
|
extern int ohcidebug;
|
|
|
|
#endif
|
1999-11-28 20:46:29 +00:00
|
|
|
/*
|
|
|
|
* 0 - do usual exploration
|
|
|
|
* 1 - do not use timeout exploration
|
|
|
|
* >1 - do no exploration
|
|
|
|
*/
|
1999-11-17 22:33:51 +00:00
|
|
|
int usb_noexplore = 0;
|
1998-11-26 23:13:13 +00:00
|
|
|
#else
|
|
|
|
#define DPRINTF(x)
|
|
|
|
#define DPRINTFN(n,x)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
struct usb_softc {
|
1999-11-17 22:33:51 +00:00
|
|
|
USBBASEDEVICE sc_dev; /* base device */
|
1998-11-26 23:13:13 +00:00
|
|
|
usbd_bus_handle sc_bus; /* USB controller */
|
|
|
|
struct usbd_port sc_port; /* dummy port for root hub */
|
1999-11-17 22:33:51 +00:00
|
|
|
|
|
|
|
struct proc *sc_event_thread;
|
|
|
|
|
|
|
|
char sc_dying;
|
1998-11-26 23:13:13 +00:00
|
|
|
};
|
|
|
|
|
1999-10-07 19:26:38 +00:00
|
|
|
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
1999-11-17 22:33:51 +00:00
|
|
|
cdev_decl(usb);
|
1999-01-07 23:07:57 +00:00
|
|
|
#elif defined(__FreeBSD__)
|
1998-11-26 23:13:13 +00:00
|
|
|
d_open_t usbopen;
|
|
|
|
d_close_t usbclose;
|
1999-11-17 22:33:51 +00:00
|
|
|
d_read_t usbread;
|
1998-11-26 23:13:13 +00:00
|
|
|
d_ioctl_t usbioctl;
|
2001-09-12 08:38:13 +00:00
|
|
|
d_poll_t usbpoll;
|
1998-11-26 23:13:13 +00:00
|
|
|
|
|
|
|
struct cdevsw usb_cdevsw = {
|
1999-10-07 19:26:38 +00:00
|
|
|
/* open */ usbopen,
|
|
|
|
/* close */ usbclose,
|
1999-11-19 13:13:28 +00:00
|
|
|
/* read */ usbread,
|
1999-10-07 19:26:38 +00:00
|
|
|
/* write */ nowrite,
|
|
|
|
/* ioctl */ usbioctl,
|
|
|
|
/* poll */ usbpoll,
|
|
|
|
/* mmap */ nommap,
|
|
|
|
/* strategy */ nostrategy,
|
|
|
|
/* name */ "usb",
|
|
|
|
/* maj */ USB_CDEV_MAJOR,
|
|
|
|
/* dump */ nodump,
|
|
|
|
/* psize */ nopsize,
|
|
|
|
/* flags */ 0,
|
1998-11-26 23:13:13 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2002-01-02 21:56:02 +00:00
|
|
|
Static usbd_status usb_discover(void *);
|
2000-08-04 19:05:49 +00:00
|
|
|
Static void usb_create_event_thread(void *);
|
|
|
|
Static void usb_event_thread(void *);
|
1999-11-17 22:33:51 +00:00
|
|
|
|
2002-01-26 12:40:03 +00:00
|
|
|
#define USB_MAX_EVENTS 100
|
1999-11-17 22:33:51 +00:00
|
|
|
struct usb_event_q {
|
|
|
|
struct usb_event ue;
|
2001-06-06 22:00:03 +00:00
|
|
|
TAILQ_ENTRY(usb_event_q) next;
|
1999-11-17 22:33:51 +00:00
|
|
|
};
|
2001-06-06 22:00:03 +00:00
|
|
|
Static TAILQ_HEAD(, usb_event_q) usb_events =
|
|
|
|
TAILQ_HEAD_INITIALIZER(usb_events);
|
2000-04-03 20:58:30 +00:00
|
|
|
Static int usb_nevents = 0;
|
|
|
|
Static struct selinfo usb_selevent;
|
2002-01-02 21:56:02 +00:00
|
|
|
Static struct proc *usb_async_proc; /* process that wants USB SIGIO */
|
2000-04-03 20:58:30 +00:00
|
|
|
Static int usb_dev_open = 0;
|
1999-11-17 22:33:51 +00:00
|
|
|
|
2000-08-04 19:05:49 +00:00
|
|
|
Static int usb_get_next_event(struct usb_event *);
|
1999-11-17 22:33:51 +00:00
|
|
|
|
|
|
|
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
|
|
|
/* Flag to see if we are in the cold boot process. */
|
|
|
|
extern int cold;
|
|
|
|
#endif
|
1998-11-26 23:13:13 +00:00
|
|
|
|
2000-04-03 20:58:30 +00:00
|
|
|
Static const char *usbrev_str[] = USBREV_STR;
|
1999-11-28 20:46:29 +00:00
|
|
|
|
2000-01-20 22:24:35 +00:00
|
|
|
USB_DECLARE_DRIVER_INIT(usb,
|
|
|
|
DEVMETHOD(device_suspend, bus_generic_suspend),
|
|
|
|
DEVMETHOD(device_resume, bus_generic_resume),
|
|
|
|
DEVMETHOD(device_shutdown, bus_generic_shutdown)
|
|
|
|
);
|
1998-11-26 23:13:13 +00:00
|
|
|
|
2000-08-04 19:05:49 +00:00
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
MODULE_VERSION(usb, 1);
|
|
|
|
#endif
|
|
|
|
|
1999-01-07 23:07:57 +00:00
|
|
|
USB_MATCH(usb)
|
1998-11-26 23:13:13 +00:00
|
|
|
{
|
|
|
|
DPRINTF(("usbd_match\n"));
|
1999-01-07 23:07:57 +00:00
|
|
|
return (UMATCH_GENERIC);
|
1998-11-26 23:13:13 +00:00
|
|
|
}
|
|
|
|
|
1999-01-07 23:07:57 +00:00
|
|
|
USB_ATTACH(usb)
|
1998-11-26 23:13:13 +00:00
|
|
|
{
|
1999-10-07 19:26:38 +00:00
|
|
|
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
1998-11-26 23:13:13 +00:00
|
|
|
struct usb_softc *sc = (struct usb_softc *)self;
|
1999-01-07 23:07:57 +00:00
|
|
|
#elif defined(__FreeBSD__)
|
|
|
|
struct usb_softc *sc = device_get_softc(self);
|
|
|
|
void *aux = device_get_ivars(self);
|
1999-11-28 20:46:29 +00:00
|
|
|
static int global_init_done = 0;
|
1998-11-26 23:13:13 +00:00
|
|
|
#endif
|
|
|
|
usbd_device_handle dev;
|
1999-11-17 22:33:51 +00:00
|
|
|
usbd_status err;
|
1999-11-28 20:46:29 +00:00
|
|
|
int usbrev;
|
1999-11-19 13:13:28 +00:00
|
|
|
|
1999-01-07 23:07:57 +00:00
|
|
|
sc->sc_dev = self;
|
1998-11-26 23:13:13 +00:00
|
|
|
|
|
|
|
DPRINTF(("usbd_attach\n"));
|
1999-11-28 20:46:29 +00:00
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
usbd_init();
|
1998-11-26 23:13:13 +00:00
|
|
|
sc->sc_bus = aux;
|
|
|
|
sc->sc_bus->usbctl = sc;
|
|
|
|
sc->sc_port.power = USB_MAX_POWER;
|
1999-11-28 20:46:29 +00:00
|
|
|
|
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
printf("%s", USBDEVNAME(sc->sc_dev));
|
|
|
|
#endif
|
|
|
|
usbrev = sc->sc_bus->usbrev;
|
|
|
|
printf(": USB revision %s", usbrev_str[usbrev]);
|
|
|
|
if (usbrev != USBREV_1_0 && usbrev != USBREV_1_1) {
|
|
|
|
printf(", not supported\n");
|
|
|
|
USB_ATTACH_ERROR_RETURN;
|
|
|
|
}
|
|
|
|
printf("\n");
|
|
|
|
|
2002-01-24 20:21:17 +00:00
|
|
|
/* Make sure not to use tsleep() if we are cold booting. */
|
|
|
|
if (cold)
|
|
|
|
sc->sc_bus->use_polling++;
|
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
err = usbd_new_device(USBDEV(sc->sc_dev), sc->sc_bus, 0, 0, 0,
|
|
|
|
&sc->sc_port);
|
|
|
|
if (!err) {
|
1998-11-26 23:13:13 +00:00
|
|
|
dev = sc->sc_port.device;
|
1999-11-17 22:33:51 +00:00
|
|
|
if (dev->hub == NULL) {
|
|
|
|
sc->sc_dying = 1;
|
1999-01-07 23:07:57 +00:00
|
|
|
printf("%s: root device is not a hub\n",
|
|
|
|
USBDEVNAME(sc->sc_dev));
|
|
|
|
USB_ATTACH_ERROR_RETURN;
|
1998-11-26 23:13:13 +00:00
|
|
|
}
|
|
|
|
sc->sc_bus->root_hub = dev;
|
1999-11-17 22:33:51 +00:00
|
|
|
#if 1
|
|
|
|
/*
|
|
|
|
* Turning this code off will delay attachment of USB devices
|
|
|
|
* until the USB event thread is running, which means that
|
|
|
|
* the keyboard will not work until after cold boot.
|
|
|
|
*/
|
2002-01-24 20:21:17 +00:00
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
if (cold)
|
|
|
|
#else
|
|
|
|
if (cold && (sc->sc_dev.dv_cfdata->cf_flags & 1))
|
|
|
|
#endif
|
1999-11-17 22:33:51 +00:00
|
|
|
dev->hub->explore(sc->sc_bus->root_hub);
|
|
|
|
#endif
|
1998-11-26 23:13:13 +00:00
|
|
|
} else {
|
1999-01-07 23:07:57 +00:00
|
|
|
printf("%s: root hub problem, error=%d\n",
|
1999-11-17 22:33:51 +00:00
|
|
|
USBDEVNAME(sc->sc_dev), err);
|
|
|
|
sc->sc_dying = 1;
|
1998-11-26 23:13:13 +00:00
|
|
|
}
|
2002-01-24 20:21:17 +00:00
|
|
|
if (cold)
|
|
|
|
sc->sc_bus->use_polling--;
|
1998-11-26 23:13:13 +00:00
|
|
|
|
2002-01-24 20:21:17 +00:00
|
|
|
config_pending_incr();
|
2001-06-06 22:00:03 +00:00
|
|
|
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
1999-10-07 19:26:38 +00:00
|
|
|
kthread_create(usb_create_event_thread, sc);
|
2001-06-06 22:00:03 +00:00
|
|
|
#endif
|
1999-10-07 19:26:38 +00:00
|
|
|
|
|
|
|
#if defined(__FreeBSD__)
|
2001-06-06 22:00:03 +00:00
|
|
|
usb_create_event_thread(sc);
|
1999-11-28 20:46:29 +00:00
|
|
|
/* The per controller devices (used for usb_discover) */
|
2001-06-06 22:00:03 +00:00
|
|
|
/* XXX This is redundant now, but old usbd's will want it */
|
1999-10-07 19:26:38 +00:00
|
|
|
make_dev(&usb_cdevsw, device_get_unit(self), UID_ROOT, GID_OPERATOR,
|
2001-02-19 18:14:49 +00:00
|
|
|
0660, "usb%d", device_get_unit(self));
|
1999-11-19 13:13:28 +00:00
|
|
|
if (!global_init_done) {
|
1999-11-28 20:46:29 +00:00
|
|
|
/* The device spitting out events */
|
1999-11-19 13:13:28 +00:00
|
|
|
make_dev(&usb_cdevsw, USB_DEV_MINOR, UID_ROOT, GID_OPERATOR,
|
2001-02-19 18:14:49 +00:00
|
|
|
0660, "usb");
|
1999-11-19 13:13:28 +00:00
|
|
|
global_init_done = 1;
|
|
|
|
}
|
1999-10-07 19:26:38 +00:00
|
|
|
#endif
|
|
|
|
|
1999-01-07 23:07:57 +00:00
|
|
|
USB_ATTACH_SUCCESS_RETURN;
|
1998-11-26 23:13:13 +00:00
|
|
|
}
|
|
|
|
|
1999-10-07 19:26:38 +00:00
|
|
|
void
|
2002-01-02 21:56:02 +00:00
|
|
|
usb_create_event_thread(void *arg)
|
1999-10-07 19:26:38 +00:00
|
|
|
{
|
|
|
|
struct usb_softc *sc = arg;
|
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
if (kthread_create1(usb_event_thread, sc, &sc->sc_event_thread,
|
2001-06-06 22:00:03 +00:00
|
|
|
"%s", USBDEVNAME(sc->sc_dev))) {
|
1999-10-07 19:26:38 +00:00
|
|
|
printf("%s: unable to create event thread for\n",
|
2001-06-06 22:00:03 +00:00
|
|
|
USBDEVNAME(sc->sc_dev));
|
1999-10-07 19:26:38 +00:00
|
|
|
panic("usb_create_event_thread");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-01-02 21:56:02 +00:00
|
|
|
usb_event_thread(void *arg)
|
1999-10-07 19:26:38 +00:00
|
|
|
{
|
|
|
|
struct usb_softc *sc = arg;
|
2001-06-06 22:00:03 +00:00
|
|
|
int to;
|
2002-01-24 20:21:17 +00:00
|
|
|
int first = 1;
|
2001-06-06 22:00:03 +00:00
|
|
|
|
|
|
|
#ifdef __FreeBSD__
|
|
|
|
mtx_lock(&Giant);
|
|
|
|
#endif
|
1999-10-07 19:26:38 +00:00
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
DPRINTF(("usb_event_thread: start\n"));
|
|
|
|
|
|
|
|
while (!sc->sc_dying) {
|
|
|
|
#ifdef USB_DEBUG
|
1999-11-28 20:46:29 +00:00
|
|
|
if (usb_noexplore < 2)
|
1999-11-17 22:33:51 +00:00
|
|
|
#endif
|
|
|
|
usb_discover(sc);
|
2002-01-24 20:21:17 +00:00
|
|
|
if (first) {
|
|
|
|
config_pending_decr();
|
|
|
|
first = 0;
|
|
|
|
}
|
2001-06-06 22:00:03 +00:00
|
|
|
to = hz * 60;
|
1999-11-28 20:46:29 +00:00
|
|
|
#ifdef USB_DEBUG
|
2001-06-06 22:00:03 +00:00
|
|
|
if (usb_noexplore)
|
|
|
|
to = 0;
|
1999-11-28 20:46:29 +00:00
|
|
|
#endif
|
2001-06-06 22:00:03 +00:00
|
|
|
(void)tsleep(&sc->sc_bus->needs_explore, PWAIT, "usbevt", to);
|
1999-10-07 19:26:38 +00:00
|
|
|
DPRINTFN(2,("usb_event_thread: woke up\n"));
|
|
|
|
}
|
2002-01-02 21:56:02 +00:00
|
|
|
sc->sc_event_thread = NULL;
|
1999-10-07 19:26:38 +00:00
|
|
|
|
|
|
|
/* In case parent is waiting for us to exit. */
|
|
|
|
wakeup(sc);
|
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
DPRINTF(("usb_event_thread: exit\n"));
|
1999-10-07 19:26:38 +00:00
|
|
|
kthread_exit(0);
|
|
|
|
}
|
|
|
|
|
2001-06-06 22:00:03 +00:00
|
|
|
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
1998-11-26 23:13:13 +00:00
|
|
|
int
|
2002-01-02 21:56:02 +00:00
|
|
|
usbctlprint(void *aux, const char *pnp)
|
1998-11-26 23:13:13 +00:00
|
|
|
{
|
|
|
|
/* only "usb"es can attach to host controllers */
|
|
|
|
if (pnp)
|
|
|
|
printf("usb at %s", pnp);
|
|
|
|
|
|
|
|
return (UNCONF);
|
|
|
|
}
|
1999-11-17 22:33:51 +00:00
|
|
|
#endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
|
1998-11-26 23:13:13 +00:00
|
|
|
|
|
|
|
int
|
2002-01-02 21:56:02 +00:00
|
|
|
usbopen(dev_t dev, int flag, int mode, usb_proc_ptr p)
|
1998-11-26 23:13:13 +00:00
|
|
|
{
|
1999-11-19 13:13:28 +00:00
|
|
|
int unit = USBUNIT(dev);
|
1999-11-17 22:33:51 +00:00
|
|
|
struct usb_softc *sc;
|
1998-11-26 23:13:13 +00:00
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
if (unit == USB_DEV_MINOR) {
|
|
|
|
if (usb_dev_open)
|
|
|
|
return (EBUSY);
|
|
|
|
usb_dev_open = 1;
|
|
|
|
usb_async_proc = 0;
|
|
|
|
return (0);
|
1999-11-19 13:13:28 +00:00
|
|
|
} else {
|
|
|
|
USB_GET_SC_OPEN(usb, unit, sc);
|
1999-11-17 22:33:51 +00:00
|
|
|
|
1999-11-19 13:13:28 +00:00
|
|
|
if (sc->sc_dying)
|
|
|
|
return (EIO);
|
1998-11-26 23:13:13 +00:00
|
|
|
|
1999-11-19 13:13:28 +00:00
|
|
|
return (0);
|
|
|
|
}
|
1998-11-26 23:13:13 +00:00
|
|
|
}
|
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
int
|
2002-01-02 21:56:02 +00:00
|
|
|
usbread(dev_t dev, struct uio *uio, int flag)
|
1999-11-17 22:33:51 +00:00
|
|
|
{
|
|
|
|
struct usb_event ue;
|
1999-11-19 13:13:28 +00:00
|
|
|
int unit = USBUNIT(dev);
|
1999-11-17 22:33:51 +00:00
|
|
|
int s, error, n;
|
|
|
|
|
1999-11-19 13:13:28 +00:00
|
|
|
if (unit != USB_DEV_MINOR)
|
|
|
|
return (ENODEV);
|
1999-11-17 22:33:51 +00:00
|
|
|
|
|
|
|
if (uio->uio_resid != sizeof(struct usb_event))
|
|
|
|
return (EINVAL);
|
|
|
|
|
|
|
|
error = 0;
|
|
|
|
s = splusb();
|
|
|
|
for (;;) {
|
|
|
|
n = usb_get_next_event(&ue);
|
|
|
|
if (n != 0)
|
|
|
|
break;
|
|
|
|
if (flag & IO_NDELAY) {
|
|
|
|
error = EWOULDBLOCK;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
error = tsleep(&usb_events, PZERO | PCATCH, "usbrea", 0);
|
|
|
|
if (error)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
splx(s);
|
|
|
|
if (!error)
|
|
|
|
error = uiomove((void *)&ue, uio->uio_resid, uio);
|
|
|
|
|
|
|
|
return (error);
|
|
|
|
}
|
|
|
|
|
1998-11-26 23:13:13 +00:00
|
|
|
int
|
2002-01-02 21:56:02 +00:00
|
|
|
usbclose(dev_t dev, int flag, int mode, usb_proc_ptr p)
|
1998-11-26 23:13:13 +00:00
|
|
|
{
|
1999-11-19 13:13:28 +00:00
|
|
|
int unit = USBUNIT(dev);
|
1999-11-17 22:33:51 +00:00
|
|
|
|
|
|
|
if (unit == USB_DEV_MINOR) {
|
|
|
|
usb_async_proc = 0;
|
|
|
|
usb_dev_open = 0;
|
|
|
|
}
|
|
|
|
|
1998-11-26 23:13:13 +00:00
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2002-01-02 21:56:02 +00:00
|
|
|
usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
|
1998-11-26 23:13:13 +00:00
|
|
|
{
|
1999-11-17 22:33:51 +00:00
|
|
|
struct usb_softc *sc;
|
1999-11-19 13:13:28 +00:00
|
|
|
int unit = USBUNIT(devt);
|
1999-11-17 22:33:51 +00:00
|
|
|
|
|
|
|
if (unit == USB_DEV_MINOR) {
|
|
|
|
switch (cmd) {
|
|
|
|
case FIONBIO:
|
|
|
|
/* All handled in the upper FS layer. */
|
|
|
|
return (0);
|
|
|
|
|
|
|
|
case FIOASYNC:
|
|
|
|
if (*(int *)data)
|
2002-01-02 16:33:53 +00:00
|
|
|
usb_async_proc = p->td_proc;
|
1999-11-17 22:33:51 +00:00
|
|
|
else
|
|
|
|
usb_async_proc = 0;
|
|
|
|
return (0);
|
|
|
|
|
|
|
|
default:
|
|
|
|
return (EINVAL);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
USB_GET_SC(usb, unit, sc);
|
|
|
|
|
|
|
|
if (sc->sc_dying)
|
|
|
|
return (EIO);
|
1998-11-26 23:13:13 +00:00
|
|
|
|
|
|
|
switch (cmd) {
|
1999-11-17 22:33:51 +00:00
|
|
|
#if defined(__FreeBSD__)
|
2001-06-06 22:00:03 +00:00
|
|
|
/* This part should be deleted */
|
1999-11-17 22:33:51 +00:00
|
|
|
case USB_DISCOVER:
|
|
|
|
break;
|
|
|
|
#endif
|
1998-11-26 23:13:13 +00:00
|
|
|
#ifdef USB_DEBUG
|
|
|
|
case USB_SETDEBUG:
|
1999-11-17 22:33:51 +00:00
|
|
|
usbdebug = ((*(int *)data) & 0x000000ff);
|
|
|
|
#ifdef UHCI_DEBUG
|
|
|
|
uhcidebug = ((*(int *)data) & 0x0000ff00) >> 8;
|
|
|
|
#endif
|
|
|
|
#ifdef OHCI_DEBUG
|
|
|
|
ohcidebug = ((*(int *)data) & 0x00ff0000) >> 16;
|
1998-11-26 23:13:13 +00:00
|
|
|
#endif
|
|
|
|
break;
|
2002-01-02 21:56:02 +00:00
|
|
|
#endif /* USB_DEBUG */
|
1998-11-26 23:13:13 +00:00
|
|
|
case USB_REQUEST:
|
|
|
|
{
|
|
|
|
struct usb_ctl_request *ur = (void *)data;
|
|
|
|
int len = UGETW(ur->request.wLength);
|
|
|
|
struct iovec iov;
|
|
|
|
struct uio uio;
|
|
|
|
void *ptr = 0;
|
|
|
|
int addr = ur->addr;
|
1999-11-17 22:33:51 +00:00
|
|
|
usbd_status err;
|
1998-11-26 23:13:13 +00:00
|
|
|
int error = 0;
|
|
|
|
|
1999-01-07 23:07:57 +00:00
|
|
|
DPRINTF(("usbioctl: USB_REQUEST addr=%d len=%d\n", addr, len));
|
1998-11-26 23:13:13 +00:00
|
|
|
if (len < 0 || len > 32768)
|
1999-01-07 23:07:57 +00:00
|
|
|
return (EINVAL);
|
1998-11-26 23:13:13 +00:00
|
|
|
if (addr < 0 || addr >= USB_MAX_DEVICES ||
|
|
|
|
sc->sc_bus->devices[addr] == 0)
|
1999-01-07 23:07:57 +00:00
|
|
|
return (EINVAL);
|
1998-11-26 23:13:13 +00:00
|
|
|
if (len != 0) {
|
|
|
|
iov.iov_base = (caddr_t)ur->data;
|
|
|
|
iov.iov_len = len;
|
|
|
|
uio.uio_iov = &iov;
|
|
|
|
uio.uio_iovcnt = 1;
|
|
|
|
uio.uio_resid = len;
|
|
|
|
uio.uio_offset = 0;
|
|
|
|
uio.uio_segflg = UIO_USERSPACE;
|
|
|
|
uio.uio_rw =
|
|
|
|
ur->request.bmRequestType & UT_READ ?
|
|
|
|
UIO_READ : UIO_WRITE;
|
2002-01-02 23:31:08 +00:00
|
|
|
uio.uio_procp = p;
|
1998-11-26 23:13:13 +00:00
|
|
|
ptr = malloc(len, M_TEMP, M_WAITOK);
|
|
|
|
if (uio.uio_rw == UIO_WRITE) {
|
|
|
|
error = uiomove(ptr, len, &uio);
|
|
|
|
if (error)
|
|
|
|
goto ret;
|
|
|
|
}
|
|
|
|
}
|
1999-11-17 22:33:51 +00:00
|
|
|
err = usbd_do_request_flags(sc->sc_bus->devices[addr],
|
|
|
|
&ur->request, ptr, ur->flags, &ur->actlen);
|
|
|
|
if (err) {
|
1998-11-26 23:13:13 +00:00
|
|
|
error = EIO;
|
|
|
|
goto ret;
|
|
|
|
}
|
|
|
|
if (len != 0) {
|
|
|
|
if (uio.uio_rw == UIO_READ) {
|
|
|
|
error = uiomove(ptr, len, &uio);
|
|
|
|
if (error)
|
|
|
|
goto ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ret:
|
|
|
|
if (ptr)
|
|
|
|
free(ptr, M_TEMP);
|
|
|
|
return (error);
|
|
|
|
}
|
|
|
|
|
|
|
|
case USB_DEVICEINFO:
|
|
|
|
{
|
|
|
|
struct usb_device_info *di = (void *)data;
|
|
|
|
int addr = di->addr;
|
|
|
|
usbd_device_handle dev;
|
|
|
|
|
|
|
|
if (addr < 1 || addr >= USB_MAX_DEVICES)
|
|
|
|
return (EINVAL);
|
|
|
|
dev = sc->sc_bus->devices[addr];
|
2002-01-02 21:56:02 +00:00
|
|
|
if (dev == NULL)
|
1998-11-26 23:13:13 +00:00
|
|
|
return (ENXIO);
|
2001-07-05 10:12:59 +00:00
|
|
|
usbd_fill_deviceinfo(dev, di, 1);
|
1998-11-26 23:13:13 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case USB_DEVICESTATS:
|
|
|
|
*(struct usb_device_stats *)data = sc->sc_bus->stats;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
1999-11-17 22:33:51 +00:00
|
|
|
return (EINVAL);
|
1998-11-26 23:13:13 +00:00
|
|
|
}
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2002-01-02 21:56:02 +00:00
|
|
|
usbpoll(dev_t dev, int events, usb_proc_ptr p)
|
1998-11-26 23:13:13 +00:00
|
|
|
{
|
1999-11-17 22:33:51 +00:00
|
|
|
int revents, mask, s;
|
1999-11-19 13:13:28 +00:00
|
|
|
int unit = USBUNIT(dev);
|
1998-11-26 23:13:13 +00:00
|
|
|
|
1999-11-19 13:13:28 +00:00
|
|
|
if (unit == USB_DEV_MINOR) {
|
1999-11-17 22:33:51 +00:00
|
|
|
revents = 0;
|
|
|
|
mask = POLLIN | POLLRDNORM;
|
2002-01-02 21:56:02 +00:00
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
s = splusb();
|
2002-01-02 21:56:02 +00:00
|
|
|
if (events & mask && usb_nevents > 0)
|
1999-11-17 22:33:51 +00:00
|
|
|
revents |= events & mask;
|
2002-01-02 21:56:02 +00:00
|
|
|
if (revents == 0 && events & mask)
|
2002-01-02 16:33:53 +00:00
|
|
|
selrecord(p, &usb_selevent);
|
1999-11-17 22:33:51 +00:00
|
|
|
splx(s);
|
2002-01-02 21:56:02 +00:00
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
return (revents);
|
|
|
|
} else {
|
|
|
|
#if defined(__FreeBSD__)
|
2001-06-06 22:00:03 +00:00
|
|
|
return (0); /* select/poll never wakes up - back compat */
|
1999-11-17 22:33:51 +00:00
|
|
|
#else
|
|
|
|
return (ENXIO);
|
1998-11-26 23:13:13 +00:00
|
|
|
#endif
|
1999-11-17 22:33:51 +00:00
|
|
|
}
|
|
|
|
}
|
1998-11-26 23:13:13 +00:00
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
/* Explore device tree from the root. */
|
1998-11-26 23:13:13 +00:00
|
|
|
usbd_status
|
2002-01-02 21:56:02 +00:00
|
|
|
usb_discover(void *v)
|
1998-11-26 23:13:13 +00:00
|
|
|
{
|
2002-01-02 21:56:02 +00:00
|
|
|
struct usb_softc *sc = v;
|
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
#if defined(__FreeBSD__)
|
2001-06-06 22:00:03 +00:00
|
|
|
/* splxxx should be changed to mutexes for preemption safety some day */
|
1998-11-26 23:13:13 +00:00
|
|
|
int s;
|
1999-11-17 22:33:51 +00:00
|
|
|
#endif
|
1998-11-26 23:13:13 +00:00
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
/*
|
|
|
|
* We need mutual exclusion while traversing the device tree,
|
|
|
|
* but this is guaranteed since this function is only called
|
|
|
|
* from the event thread for the controller.
|
|
|
|
*/
|
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
s = splusb();
|
|
|
|
#endif
|
|
|
|
while (sc->sc_bus->needs_explore && !sc->sc_dying) {
|
1999-10-07 19:26:38 +00:00
|
|
|
sc->sc_bus->needs_explore = 0;
|
1999-11-17 22:33:51 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1999-10-07 19:26:38 +00:00
|
|
|
splx(s);
|
1999-11-17 22:33:51 +00:00
|
|
|
#endif
|
1999-10-07 19:26:38 +00:00
|
|
|
sc->sc_bus->root_hub->hub->explore(sc->sc_bus->root_hub);
|
1999-11-17 22:33:51 +00:00
|
|
|
#if defined(__FreeBSD__)
|
1999-10-07 19:26:38 +00:00
|
|
|
s = splusb();
|
1999-11-17 22:33:51 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
#if defined(__FreeBSD__)
|
|
|
|
splx(s);
|
|
|
|
#endif
|
|
|
|
|
1999-10-07 19:26:38 +00:00
|
|
|
return (USBD_NORMAL_COMPLETION);
|
1998-11-26 23:13:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-01-02 21:56:02 +00:00
|
|
|
usb_needs_explore(usbd_bus_handle bus)
|
1998-11-26 23:13:13 +00:00
|
|
|
{
|
|
|
|
bus->needs_explore = 1;
|
1999-10-07 19:26:38 +00:00
|
|
|
wakeup(&bus->needs_explore);
|
1998-11-26 23:13:13 +00:00
|
|
|
}
|
|
|
|
|
1999-11-17 22:33:51 +00:00
|
|
|
/* Called at splusb() */
|
|
|
|
int
|
2002-01-02 21:56:02 +00:00
|
|
|
usb_get_next_event(struct usb_event *ue)
|
1999-11-17 22:33:51 +00:00
|
|
|
{
|
|
|
|
struct usb_event_q *ueq;
|
|
|
|
|
|
|
|
if (usb_nevents <= 0)
|
|
|
|
return (0);
|
2001-06-06 22:00:03 +00:00
|
|
|
ueq = TAILQ_FIRST(&usb_events);
|
|
|
|
if (ueq == NULL) {
|
|
|
|
printf("usb: usb_nevents got out of sync! %d\n", usb_nevents);
|
|
|
|
usb_nevents = 0;
|
|
|
|
return (0);
|
|
|
|
}
|
1999-11-17 22:33:51 +00:00
|
|
|
*ue = ueq->ue;
|
2001-06-06 22:00:03 +00:00
|
|
|
TAILQ_REMOVE(&usb_events, ueq, next);
|
1999-11-17 22:33:51 +00:00
|
|
|
free(ueq, M_USBDEV);
|
|
|
|
usb_nevents--;
|
|
|
|
return (1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2002-01-02 21:56:02 +00:00
|
|
|
usbd_add_event(int type, usbd_device_handle dev)
|
1999-11-17 22:33:51 +00:00
|
|
|
{
|
2001-06-06 22:00:03 +00:00
|
|
|
struct usb_event_q *ueq, *ueq_next;
|
1999-11-17 22:33:51 +00:00
|
|
|
struct usb_event ue;
|
|
|
|
struct timeval thetime;
|
|
|
|
int s;
|
|
|
|
|
|
|
|
s = splusb();
|
2002-01-02 20:16:53 +00:00
|
|
|
if (type == USB_EVENT_CTRLR_DETACH) {
|
2001-06-06 22:00:03 +00:00
|
|
|
for (ueq = TAILQ_FIRST(&usb_events); ueq; ueq = ueq_next) {
|
|
|
|
ueq_next = TAILQ_NEXT(ueq, next);
|
2002-01-02 20:16:53 +00:00
|
|
|
if (ueq->ue.u.ue_driver.ue_cookie.cookie == dev->cookie.cookie) {
|
2001-06-06 22:00:03 +00:00
|
|
|
TAILQ_REMOVE(&usb_events, ueq, next);
|
|
|
|
free(ueq, M_USBDEV);
|
|
|
|
usb_nevents--;
|
|
|
|
ueq_next = TAILQ_FIRST(&usb_events);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (usb_nevents >= USB_MAX_EVENTS) {
|
1999-11-17 22:33:51 +00:00
|
|
|
/* Too many queued events, drop an old one. */
|
1999-11-21 17:22:30 +00:00
|
|
|
DPRINTF(("usb: event dropped\n"));
|
1999-11-17 22:33:51 +00:00
|
|
|
(void)usb_get_next_event(&ue);
|
|
|
|
}
|
|
|
|
/* Don't want to wait here inside splusb() */
|
|
|
|
ueq = malloc(sizeof *ueq, M_USBDEV, M_NOWAIT);
|
|
|
|
if (ueq == NULL) {
|
|
|
|
printf("usb: no memory, event dropped\n");
|
|
|
|
splx(s);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
ueq->ue.ue_type = type;
|
2002-01-02 20:16:53 +00:00
|
|
|
ueq->ue.u.ue_driver.ue_cookie = dev->cookie;
|
|
|
|
usbd_fill_deviceinfo(dev, &ueq->ue.u.ue_device, 0);
|
1999-11-17 22:33:51 +00:00
|
|
|
microtime(&thetime);
|
|
|
|
TIMEVAL_TO_TIMESPEC(&thetime, &ueq->ue.ue_time);
|
2001-06-06 22:00:03 +00:00
|
|
|
TAILQ_INSERT_TAIL(&usb_events, ueq, next);
|
|
|
|
usb_nevents++;
|
1999-11-17 22:33:51 +00:00
|
|
|
wakeup(&usb_events);
|
|
|
|
selwakeup(&usb_selevent);
|
2001-03-07 03:37:06 +00:00
|
|
|
if (usb_async_proc != NULL) {
|
|
|
|
PROC_LOCK(usb_async_proc);
|
1999-11-17 22:33:51 +00:00
|
|
|
psignal(usb_async_proc, SIGIO);
|
2001-03-07 03:37:06 +00:00
|
|
|
PROC_UNLOCK(usb_async_proc);
|
|
|
|
}
|
1999-11-17 22:33:51 +00:00
|
|
|
splx(s);
|
|
|
|
}
|
|
|
|
|
1999-10-07 19:26:38 +00:00
|
|
|
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
|
|
|
int
|
2002-01-02 21:56:02 +00:00
|
|
|
usb_activate(device_ptr_t self, enum devact act)
|
1999-10-07 19:26:38 +00:00
|
|
|
{
|
1999-11-17 22:33:51 +00:00
|
|
|
struct usb_softc *sc = (struct usb_softc *)self;
|
|
|
|
usbd_device_handle dev = sc->sc_port.device;
|
|
|
|
int i, rv = 0;
|
|
|
|
|
|
|
|
switch (act) {
|
|
|
|
case DVACT_ACTIVATE:
|
|
|
|
return (EOPNOTSUPP);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DVACT_DEACTIVATE:
|
|
|
|
sc->sc_dying = 1;
|
|
|
|
if (dev && dev->cdesc && dev->subdevs) {
|
|
|
|
for (i = 0; dev->subdevs[i]; i++)
|
|
|
|
rv |= config_deactivate(dev->subdevs[i]);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return (rv);
|
1999-10-07 19:26:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2002-01-02 21:56:02 +00:00
|
|
|
usb_detach(device_ptr_t self, int flags)
|
1999-10-07 19:26:38 +00:00
|
|
|
{
|
1999-11-17 22:33:51 +00:00
|
|
|
struct usb_softc *sc = (struct usb_softc *)self;
|
|
|
|
|
|
|
|
DPRINTF(("usb_detach: start\n"));
|
|
|
|
|
|
|
|
sc->sc_dying = 1;
|
|
|
|
|
|
|
|
/* Make all devices disconnect. */
|
|
|
|
if (sc->sc_port.device)
|
|
|
|
usb_disconnect_port(&sc->sc_port, self);
|
|
|
|
|
|
|
|
/* Kill off event thread. */
|
|
|
|
if (sc->sc_event_thread) {
|
|
|
|
wakeup(&sc->sc_bus->needs_explore);
|
|
|
|
if (tsleep(sc, PWAIT, "usbdet", hz * 60))
|
|
|
|
printf("%s: event thread didn't die\n",
|
|
|
|
USBDEVNAME(sc->sc_dev));
|
|
|
|
DPRINTF(("usb_detach: event thread dead\n"));
|
|
|
|
}
|
|
|
|
|
|
|
|
usbd_finish();
|
1999-10-07 19:26:38 +00:00
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
#elif defined(__FreeBSD__)
|
1999-01-07 23:07:57 +00:00
|
|
|
int
|
|
|
|
usb_detach(device_t self)
|
|
|
|
{
|
1999-04-20 21:10:43 +00:00
|
|
|
DPRINTF(("%s: unload, prevented\n", USBDEVNAME(self)));
|
1999-01-07 23:07:57 +00:00
|
|
|
|
1999-04-20 21:10:43 +00:00
|
|
|
return (EINVAL);
|
1999-01-07 23:07:57 +00:00
|
|
|
}
|
1999-10-07 19:26:38 +00:00
|
|
|
#endif
|
1999-01-07 23:07:57 +00:00
|
|
|
|
1999-10-07 19:26:38 +00:00
|
|
|
|
|
|
|
#if defined(__FreeBSD__)
|
1999-04-16 21:22:55 +00:00
|
|
|
DRIVER_MODULE(usb, ohci, usb_driver, usb_devclass, 0, 0);
|
1999-10-07 19:26:38 +00:00
|
|
|
DRIVER_MODULE(usb, uhci, usb_driver, usb_devclass, 0, 0);
|
1998-11-26 23:13:13 +00:00
|
|
|
#endif
|