1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-06 13:09:50 +00:00

USB controller:

- allow disabling "root_mount_hold()" by setting "hw.usb.no_boot_wait" sysctl

Submitted by:	hps
Approved by:	re
This commit is contained in:
Alfred Perlstein 2009-07-30 00:16:32 +00:00
parent 4743e6da52
commit a0c61406ad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=195965

View File

@ -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);