mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
Corrected the latent fact that the uhub driver was providing a driver for
the usb device class instead of the uhub devclass. Only a problem with more than one USB host controller.
This commit is contained in:
parent
86d7ad019e
commit
1c8fa23724
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=42640
@ -135,5 +135,5 @@ ucom_detach(device_t self)
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
DRIVER_MODULE(ucom, usb, ucom_driver, ucom_devclass, usbd_driver_load, 0);
|
||||
DRIVER_MODULE(ucom, uhub, ucom_driver, ucom_devclass, usbd_driver_load, 0);
|
||||
#endif
|
||||
|
@ -981,5 +981,5 @@ ugen_detach(device_t self)
|
||||
return 0;
|
||||
}
|
||||
|
||||
DRIVER_MODULE(ugen, usb, ugen_driver, ugen_devclass, usbd_driver_load, 0);
|
||||
DRIVER_MODULE(ugen, uhub, ugen_driver, ugen_devclass, usbd_driver_load, 0);
|
||||
#endif
|
||||
|
@ -542,5 +542,5 @@ uhidpoll(dev, events, p)
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
DRIVER_MODULE(uhid, usb, uhid_driver, uhid_devclass, usbd_driver_load, 0);
|
||||
DRIVER_MODULE(uhid, uhub, uhid_driver, uhid_devclass, usbd_driver_load, 0);
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* $NetBSD: uhub.c,v 1.14 1999/01/08 11:58:25 augustss Exp $ */
|
||||
/* FreeBSD $Id: uhub.c,v 1.5 1999/01/07 23:31:34 n_hibma Exp $ */
|
||||
/* $FreeBSD$ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -81,9 +81,26 @@ void uhub_intr __P((usbd_request_handle, usbd_private_handle, usbd_status));
|
||||
|
||||
/*void uhub_disco __P((void *));*/
|
||||
|
||||
USB_DECLARE_DRIVER_NAME(usb, uhub);
|
||||
USB_DECLARE_DRIVER(uhub);
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
devclass_t uhubroot_devclass;
|
||||
|
||||
static device_method_t uhubroot_methods[] = {
|
||||
DEVMETHOD(device_probe, uhub_match),
|
||||
DEVMETHOD(device_attach, uhub_attach),
|
||||
/* detach is not allowed for a root hub */
|
||||
{0,0}
|
||||
};
|
||||
|
||||
static driver_t uhubroot_driver = {
|
||||
"uhub",
|
||||
uhubroot_methods,
|
||||
DRIVER_TYPE_MISC,
|
||||
sizeof(struct uhub_softc)
|
||||
};
|
||||
#endif
|
||||
|
||||
/* FIXME what does FreeBSD need? */
|
||||
#if defined(__NetBSD__)
|
||||
struct cfattach uhub_uhub_ca = {
|
||||
sizeof(struct uhub_softc), uhub_match, uhub_attach
|
||||
@ -499,5 +516,6 @@ uhub_intr(reqh, addr, status)
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
DRIVER_MODULE(uhub, usb, uhub_driver, uhub_devclass, usbd_driver_load, 0);
|
||||
DRIVER_MODULE(uhub, usb, uhubroot_driver, uhubroot_devclass, 0, 0);
|
||||
DRIVER_MODULE(uhub, uhub, uhub_driver, uhub_devclass, usbd_driver_load, 0);
|
||||
#endif
|
||||
|
@ -542,11 +542,11 @@ ukbd_intr(reqh, addr, status)
|
||||
/* XXX shouldn't the keys be used? */
|
||||
for (i = 0; i < nkeys; i++) {
|
||||
c = ibuf[i];
|
||||
printf("%c (%d) %s\n",
|
||||
printf("%c (%d) %s ",
|
||||
((c&0xff) < 32 || (c&0xff) > 126? '.':(c&0xff)), c,
|
||||
(c&RELEASE? "released":"pressed"));
|
||||
if (ud->modifiers)
|
||||
printf("0x%04x\n", ud->modifiers);
|
||||
printf("mod = 0x%04x ", ud->modifiers);
|
||||
for (i = 0; i < NKEYCODE; i++)
|
||||
if (ud->keycode[i])
|
||||
printf("%d ", ud->keycode[i]);
|
||||
@ -676,5 +676,5 @@ ukbd_cnattach(v)
|
||||
#endif /* NetBSD */
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
DRIVER_MODULE(ukbd, usb, ukbd_driver, ukbd_devclass, usbd_driver_load, 0);
|
||||
DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, usbd_driver_load, 0);
|
||||
#endif
|
||||
|
@ -446,6 +446,6 @@ ulpt_detach(device_t self)
|
||||
return 0;
|
||||
}
|
||||
|
||||
CDEV_DRIVER_MODULE(ulpt, usb, ulpt_driver, ulpt_devclass,
|
||||
CDEV_DRIVER_MODULE(ulpt, uhub, ulpt_driver, ulpt_devclass,
|
||||
ULPT_CDEV_MAJOR, ulpt_cdevsw, usbd_driver_load, 0);
|
||||
#endif
|
||||
|
@ -137,6 +137,6 @@ umodem_detach(device_t self)
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
DRIVER_MODULE(umodem, usb, umodem_driver, umodem_devclass, usbd_driver_load,0);
|
||||
DRIVER_MODULE(umodem, uhub, umodem_driver, umodem_devclass, usbd_driver_load,0);
|
||||
#endif
|
||||
|
||||
|
@ -715,6 +715,6 @@ ums_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
|
||||
#endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
CDEV_DRIVER_MODULE(ums, usb, ums_driver, ums_devclass,
|
||||
CDEV_DRIVER_MODULE(ums, uhub, ums_driver, ums_devclass,
|
||||
UMS_CDEV_MAJOR, ums_cdevsw, usbd_driver_load, 0);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user