diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 677285442977..749cad455f3f 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -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 diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 86162a322928..f739b4b642c9 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -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 diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index 0b07dce66c3f..26c0e5b5b20f 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -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 diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 40b2a84d94fb..40ff36317add 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -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 diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index c9b9a72f8d34..0d54e01f3ac1 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -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 diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index e3f265715b71..074fe0489333 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -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 diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 23f34892680e..16bfae25ae16 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -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 diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 745e255b6248..e92d027ec0db 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -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