From c771dfeb92ac7c03200839673dde83bd36b2ec0e Mon Sep 17 00:00:00 2001 From: Jacob Meuser Date: Mon, 6 Dec 2010 04:30:58 +0000 Subject: call config_deactivate() before config_detach() when detaching devices. --- sys/dev/usb/usb_subr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/dev/usb') diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 543f1d13ba5..cbd7e6c77f0 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.74 2010/09/24 00:12:36 deraadt Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.75 2010/12/06 04:30:57 jakemsr Exp $ */ /* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -1461,6 +1461,10 @@ usb_disconnect_port(struct usbd_port *up, struct device *parent) parent->dv_xname)); if (up->portno != 0) DPRINTF((" port %d", up->portno)); + DPRINTF((" (addr %d) deactivated\n", dev->address)); + config_deactivate(dev->subdevs[i]); + } + for (i = 0; dev->subdevs[i]; i++) { DPRINTF((" (addr %d) disconnected\n", dev->address)); config_detach(dev->subdevs[i], DETACH_FORCE); dev->subdevs[i] = 0; -- cgit v1.2.3