Date: Tue, 28 Jul 2009 18:08:57 +0200 From: Olivier SMEDTS <olivier@gid0.org> To: Andriy Gapon <avg@icyb.net.ua> Cc: Alfred Perlstein <alfred@FreeBSD.org>, freebsd-current@FreeBSD.org, Robert Noland <rnoland@FreeBSD.org>, Hans Petter Selasky <hselasky@c2i.net> Subject: Re: Disable root mount waiting for USB Message-ID: <20090728160857.GA1205@q.gid0.org> In-Reply-To: <4A6F08CE.8010605@icyb.net.ua> References: <367b2c980907270358g45a2497dh64c2734721c44fca@mail.gmail.com> <4A6EF8CD.7070305@icyb.net.ua> <1248786876.73923.6.camel@balrog.2hip.net> <200907281522.08446.hselasky@c2i.net> <4A6EFEE7.3090102@icyb.net.ua> <1248788421.73923.7.camel@balrog.2hip.net> <1248789145.73923.10.camel@balrog.2hip.net> <4A6F08CE.8010605@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 28, 2009 at 05:18:54PM +0300, Andriy Gapon wrote: > on 28/07/2009 16:52 Robert Noland said the following: > > Ok, Apparently I'm incorrect here... The man page is misleading... It > > seems that you do need to declare the TUNABLE_INT as well as change the > > CTLFLAG_RW to CTLFLAG_RDTUN. Attached patch tested, works as expected. > > Yes, the former change is "cosmetics" (very useful variety) that turns the sysctl > into read-only one (because changing it after boot would have no effect either > way) and provides a hint to sysctl(1) to print much friendlier and useful error > message when a user would attempt to change the value. > > -- > Andriy Gapon -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." --jRHKVT23PllUwdXP Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline; filename=patch Content-Transfer-Encoding: 8bit Index: sys/dev/usb/controller/usb_controller.c =================================================================== --- sys/dev/usb/controller/usb_controller.c (révision 195918) +++ sys/dev/usb/controller/usb_controller.c (copie de travail) @@ -79,6 +79,11 @@ "Debug level"); #endif +static int usb_no_boot_wait = 0; +SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0, + "No device enumerate waiting at boot."); +TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait); + static uint8_t usb_post_init_called = 0; static devclass_t usb_devclass; @@ -132,8 +137,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); --jRHKVT23PllUwdXP--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090728160857.GA1205>