summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2021-06-13 00:11:57 +0000
committerriastradh <riastradh@NetBSD.org>2021-06-13 00:11:57 +0000
commita8dda320af318e2a8ce6746cec77692e1a6101dc (patch)
tree44af2b8457234a9aa02bd84ebe6b9cd24751cb0b /sys/dev
parentd3f47f5147d1efa541058c22d05b808c8ea1b153 (diff)
uhub(4): Trigger bus exploration after rescanning children.
Otherwise, if uhub4 is attached at uhub1, then when we do # drvctl -d uhub4 # drvctl -r -a usbdevif uhub1 the rescan never discovers devices attached recursively at uhub4, and uhub4 leaks a config_pending_incr count so it can't be detached.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/uhub.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 4d253dd7aa0..be8d8ce1b50 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhub.c,v 1.150 2021/06/12 12:13:23 riastradh Exp $ */
+/* $NetBSD: uhub.c,v 1.151 2021/06/13 00:11:57 riastradh Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
/* $OpenBSD: uhub.c,v 1.86 2015/06/29 18:27:40 mpi Exp $ */
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.150 2021/06/12 12:13:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.151 2021/06/13 00:11:57 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -946,6 +946,10 @@ uhub_rescan(device_t self, const char *ifattr, const int *locators)
usbd_reattach_device(sc->sc_dev, dev, port, locators);
}
uhub_explore_exit(sc);
+
+ /* Arrange to recursively explore hubs we may have found. */
+ usb_needs_explore(sc->sc_hub);
+
return 0;
}