diff options
author | Josef Karthauser <joe@FreeBSD.org> | 2002-01-28 01:03:19 +0000 |
---|---|---|
committer | Josef Karthauser <joe@FreeBSD.org> | 2002-01-28 01:03:19 +0000 |
commit | a07e9d4af3f47a6d2a75a7aa903add70886b863c (patch) | |
tree | c7820152b3d171d7820a328b8adc34c87a71de86 /sys/dev/usb/usb_subr.c | |
parent | a31999ca51d72a54f719da540a4d13c5ca72cdd2 (diff) | |
download | src-a07e9d4af3f47a6d2a75a7aa903add70886b863c.tar.gz src-a07e9d4af3f47a6d2a75a7aa903add70886b863c.zip |
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.
Notes
Notes:
svn path=/head/; revision=89892
Diffstat (limited to 'sys/dev/usb/usb_subr.c')
-rw-r--r-- | sys/dev/usb/usb_subr.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index f17e5155cf03..2565c44a8e59 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1031,9 +1031,9 @@ usbd_new_device(device_ptr_t parent, usbd_bus_handle bus, int depth, usbd_remove_device(dev, up); return (err); } - - usbd_add_event(USB_EVENT_CTRLR_ATTACH, dev); + usbd_add_dev_event(USB_EVENT_DEVICE_ATTACH, dev); + return (USBD_NORMAL_COMPLETION); } @@ -1158,6 +1158,7 @@ usbd_fill_deviceinfo(usbd_device_handle dev, struct usb_device_info *di, di->bus = USBDEVUNIT(dev->bus->bdev); di->addr = dev->address; + di->cookie = dev->cookie; usbd_devinfo_vp(dev, di->vendor, di->product, usedev); usbd_printBCD(di->release, UGETW(dev->ddesc.bcdDevice)); di->vendorNo = UGETW(dev->ddesc.idVendor); @@ -1281,7 +1282,7 @@ usb_disconnect_port(struct usbd_port *up, device_ptr_t parent) } } - /*usbd_add_event(USB_EVENT_DETACH, dev);*/ + /*usbd_add_dev_event(USB_EVENT_DEVICE_DETACH, dev);*/ dev->bus->devices[dev->address] = NULL; up->device = NULL; usb_free_device(dev); |