PERFORCE change 166673 for review

Hans Petter Selasky hselasky at FreeBSD.org
Tue Jul 28 10:29:27 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=166673

Change 166673 by hselasky at hselasky_laptop001 on 2009/07/28 10:28:46

	
	USB controller:
	 - allow disabling "root_mount_hold()" by setting a sysctl

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/controller/usb_controller.c#22 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/controller/usb_controller.c#22 (text+ko) ====

@@ -79,6 +79,10 @@
     "Debug level");
 #endif
 
+static int usb_no_boot_wait = 0;
+SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RW, &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 +136,10 @@
 		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 p4-projects mailing list