diff options
author | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-12-06 04:30:58 +0000 |
---|---|---|
committer | Jacob Meuser <jakemsr@cvs.openbsd.org> | 2010-12-06 04:30:58 +0000 |
commit | c771dfeb92ac7c03200839673dde83bd36b2ec0e (patch) | |
tree | faa1e010125b0489af183877290f9793b1d22947 /sys/dev | |
parent | 9f859f597e76071c9526e0c90e6ac400f16a14fc (diff) |
call config_deactivate() before config_detach() when detaching devices.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/usb_subr.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |