From 4de762365a9b9a7abf2c4f8634a18d2c79e9fb8d Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Fri, 19 Mar 2004 06:15:45 +0000 Subject: [PATCH] Re-enable detach events after adding a bugfix from NetBSD that unbreaks them. Submitted by: dillon Obtained from: NetBSD MFC after: 2 days --- sys/dev/usb/usb_subr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index b73f20dba7a..db7d6a4a480 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1376,10 +1376,11 @@ usb_disconnect_port(struct usbd_port *up, device_ptr_t parent) printf(" port %d", up->portno); printf(" (addr %d) disconnected\n", dev->address); config_detach(dev->subdevs[i], DETACH_FORCE); + dev->subdevs[i] = NULL; } } - /*usbd_add_dev_event(USB_EVENT_DEVICE_DETACH, dev);*/ + usbd_add_dev_event(USB_EVENT_DEVICE_DETACH, dev); dev->bus->devices[dev->address] = NULL; up->device = NULL; usb_free_device(dev);