diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2022-06-09 13:15:49 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2022-10-05 10:12:33 +0000 |
commit | 55a3bd000d9799f431c207e359466484ac63c137 (patch) | |
tree | 019a386f1701c4f21e30ca9dcfe80beeda45d6ab | |
parent | d2d30464365ebaa9f4b04371f947fcffcc3975e1 (diff) | |
download | src-55a3bd000d9799f431c207e359466484ac63c137.tar.gz src-55a3bd000d9799f431c207e359466484ac63c137.zip |
usb(4): Make sure the enumeration thread doesn't loop too fast.
MFC after: 1 week
Sponsored by: NVIDIA Networking
-rw-r--r-- | sys/dev/usb/controller/usb_controller.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c index 0897af0492cb..959f54a4583f 100644 --- a/sys/dev/usb/controller/usb_controller.c +++ b/sys/dev/usb/controller/usb_controller.c @@ -414,6 +414,9 @@ usb_bus_explore(struct usb_proc_msg *pm) #if USB_HAVE_ROOT_MOUNT_HOLD usb_root_mount_rel(bus); #endif + + /* Nice the enumeration a bit, to avoid looping too fast. */ + usb_pause_mtx(&bus->bus_mtx, USB_MS_TO_TICKS(16)); } /*------------------------------------------------------------------------* |