From a07e9d4af3f47a6d2a75a7aa903add70886b863c Mon Sep 17 00:00:00 2001 From: Josef Karthauser Date: Mon, 28 Jan 2002 01:03:19 +0000 Subject: Merge from NetBSD. uhub.c: revision 1.37 usb.4: revision 1.30 usb.c: revision 1.38 usb.h: revision 1.40 usb_port.h: revision 1.21 usb_subr.c: revision 1.65 usbdi.h: revision 1.40 Split the attach/detach events up into device, driver and controller attach and detach events. The commit message from NetBSD was: date: 2000/02/02 07:34:00; author: augustss; state: Exp; Change the USB event mechanism to include more information about devices and drivers. Partly from FreeBSD. Also rework usbd to take these new event types into account. --- sys/dev/usb/uhub.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/dev/usb/uhub.c') diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 0533249aab8d..05a19729e8e2 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -263,6 +263,8 @@ USB_ATTACH(uhub) /* Wait with power off for a while. */ usbd_delay_ms(dev, USB_POWER_DOWN_TIME); + usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, dev, USBDEV(sc->sc_dev)); + /* * To have the best chance of success we do things in the exact same * order as Windoze98. This should not be necessary, but some @@ -525,7 +527,8 @@ USB_DETACH(uhub) if (rup->device) usb_disconnect_port(rup, self); } - + + usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, dev, USBDEV(sc->sc_dev)); free(dev->hub, M_USBDEV); dev->hub = NULL; -- cgit v1.2.3