diff options
author | 2010-12-06 04:30:57 +0000 | |
---|---|---|
committer | 2010-12-06 04:30:57 +0000 | |
commit | 0b36301e4ae47a69d7888c889455497d30948c5b (patch) | |
tree | d75f6e7725d5dfaa224d32d99b3abcaf12da5000 /sys/dev | |
parent | * check that the root hub has been configured before trying to (diff) | |
download | wireguard-openbsd-0b36301e4ae47a69d7888c889455497d30948c5b.tar.xz wireguard-openbsd-0b36301e4ae47a69d7888c889455497d30948c5b.zip |
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; |