Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jul 2009 00:16:32 +0000 (UTC)
From:      Alfred Perlstein <alfred@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r195965 - head/sys/dev/usb/controller
Message-ID:  <200907300016.n6U0GWjh086592@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907300016.n6U0GWjh086592>