svn commit: r195965 - head/sys/dev/usb/controller
Alfred Perlstein
alfred at FreeBSD.org
Thu Jul 30 00:16:34 UTC 2009
Author: alfred
Date: Thu Jul 30 00:16:32 2009
New Revision: 195965
URL: http://svn.freebsd.org/changeset/base/195965
Log:
USB controller:
- allow disabling "root_mount_hold()" by setting "hw.usb.no_boot_wait" sysctl
Submitted by: hps
Approved by: re
Modified:
head/sys/dev/usb/controller/usb_controller.c
Modified: head/sys/dev/usb/controller/usb_controller.c
==============================================================================
--- head/sys/dev/usb/controller/usb_controller.c Thu Jul 30 00:16:06 2009 (r195964)
+++ head/sys/dev/usb/controller/usb_controller.c Thu Jul 30 00:16:32 2009 (r195965)
@@ -79,6 +79,11 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug
"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);
More information about the svn-src-head
mailing list