aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2009-07-30 00:16:32 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2009-07-30 00:16:32 +0000
commita0c61406adbed0898a06e286180b395bdac77f2f (patch)
tree0195cade73b60c8709615057c6fec4c22a83d467 /sys/dev/usb
parent4743e6da529476c70a4c17e30b8de3203eb18795 (diff)
USB controller:
- allow disabling "root_mount_hold()" by setting "hw.usb.no_boot_wait" sysctl Submitted by: hps Approved by: re
Notes
Notes: svn path=/head/; revision=195965
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/controller/usb_controller.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c
index b2f94c63e1c3..7a019dcaa7ac 100644
--- a/sys/dev/usb/controller/usb_controller.c
+++ b/sys/dev/usb/controller/usb_controller.c
@@ -79,6 +79,11 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug, CTLFLAG_RW, &usb_ctrl_debug, 0,
"Debug level");
#endif
+static int usb_no_boot_wait = 0;
+TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait);
+SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0,
+ "No device enumerate waiting at boot.");
+
static uint8_t usb_post_init_called = 0;
static devclass_t usb_devclass;
@@ -132,8 +137,10 @@ usb_attach(device_t dev)
return (ENXIO);
}
- /* delay vfs_mountroot until the bus is explored */
- bus->bus_roothold = root_mount_hold(device_get_nameunit(dev));
+ if (usb_no_boot_wait == 0) {
+ /* delay vfs_mountroot until the bus is explored */
+ bus->bus_roothold = root_mount_hold(device_get_nameunit(dev));
+ }
if (usb_post_init_called) {
mtx_lock(&Giant);