summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2009-07-30 00:16:32 +0000
committeralfred <alfred@FreeBSD.org>2009-07-30 00:16:32 +0000
commit1e6e123c8472f28c2482a5c77515f24343fbce36 (patch)
tree0195cade73b60c8709615057c6fec4c22a83d467
parent37a79960ccc95d350c6439bd5074a57e94fe5442 (diff)
downloadFreeBSD-src-1e6e123c8472f28c2482a5c77515f24343fbce36.zip
FreeBSD-src-1e6e123c8472f28c2482a5c77515f24343fbce36.tar.gz
USB controller:
- allow disabling "root_mount_hold()" by setting "hw.usb.no_boot_wait" sysctl Submitted by: hps Approved by: re
-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 b2f94c6..7a019dc 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);
OpenPOWER on IntegriCloud