From owner-freebsd-current@freebsd.org Sat Mar 19 21:56:30 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1ED4AD6D65 for ; Sat, 19 Mar 2016 21:56:30 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id B018EAF1 for ; Sat, 19 Mar 2016 21:56:30 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id AB528AD6D64; Sat, 19 Mar 2016 21:56:30 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AAECAAD6D63 for ; Sat, 19 Mar 2016 21:56:30 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41820AF0; Sat, 19 Mar 2016 21:56:30 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id l68so79811756wml.1; Sat, 19 Mar 2016 14:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=iKWxvd1fhUuYnAitucBlP8bsCk1fXGblXChqWJMU3hI=; b=a22pSdWFGUg2/FC2X7kmeP6xijv2e0wHMyPutWnf8OzwlZuOar55gU9CnzTnQoUje9 BIQlF46L7AaWGH8a3/pdVi+ObCed9fvD2b0SaRhkbkZa987YGadEbEY9qQy4058vt6p7 jV+leW4sNsn8muw/QFlLSXCjFvHOSGi+xSQTlOATATAonH50X0NLHEyoWGOl42G8ROmC P2vsAvr9qnicoqVbm8y2+ioc440mEK8UDhaqFKwQDQ+7KyhQhs+sh+/wxjz7R+DcBD17 72yO1gViTY8Hw3dGi8kVADST2rnGOomPqbKsMWEfBiVeEDRCWVxSQXhQcKPSIRBrSD33 C1FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=iKWxvd1fhUuYnAitucBlP8bsCk1fXGblXChqWJMU3hI=; b=evkmrP3Fred0nGay+1X6LMkRqH/2m397NtWUhztF5/hr4ZVGWQcpRs/yxlJjDOF7Rk wKBeXf2MgZwBuKDBnQiArJd55PqZP562KO659kYjC8tUdiY/D594xcB997jZfMLt9Xbo XueZ8hKggK3BDX/K1KLJ79+f78aD5JfYhr5NExxJ1KrRcHFGPmQS6pgZkO1sJFjKcqaS RzBOR4R7Ogzj55rr5j8qFCL6JU/mAEFs+IMedBv43UYgSkmohdq8GzMbJM8wmWYnkWFX 9iZhiO0Fjp9tdrxBOoV8t8Tpd9l9ShQWDR0HAmGbtCxQzCRzM/pq7/9LDOqu5JFx9q0l Q6LA== X-Gm-Message-State: AD7BkJLnl1aAOF2MZs54rlylJDRmetFoo6utrLCBCsW1uWyVLQ1CNcamfUzshZoMfE0wBg== X-Received: by 10.194.60.165 with SMTP id i5mr25404182wjr.178.1458424588569; Sat, 19 Mar 2016 14:56:28 -0700 (PDT) Received: from brick.home (acyo87.neoplus.adsl.tpnet.pl. [83.11.198.87]) by smtp.gmail.com with ESMTPSA id js8sm18078917wjc.37.2016.03.19.14.56.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 19 Mar 2016 14:56:27 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 19 Mar 2016 22:56:24 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Poul-Henning Kamp Cc: Ian Lepore , current@freebsd.org Subject: Re: USB disks attach after rootfs prompt Message-ID: <20160319215624.GA1325@brick.home> Mail-Followup-To: Poul-Henning Kamp , Ian Lepore , current@freebsd.org References: <1346.1458392679@critter.freebsd.dk> <1458397972.68920.69.camel@freebsd.org> <1998.1458400175@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1998.1458400175@critter.freebsd.dk> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Mar 2016 21:56:30 -0000 On 0319T1509, Poul-Henning Kamp wrote: > -------- > In message <1458397972.68920.69.camel@freebsd.org>, Ian Lepore writes: > >On Sat, 2016-03-19 at 13:04 +0000, Poul-Henning Kamp wrote: > >> Running: > >> > >> FreeBSD 11.0-CURRENT #32 r296137: Sat Feb 27 11:34:01 UTC 2016 > >> > >> I tried "boot -a" and found that USB disks only attach *after* you > >> enter some root filesystem. > >> > >> That's not terribly useful. > > > >iirc, interrupts are disabled while you're at the mountroot prompt, > >which freezes usb enumeration. > > I am somewhat certain that this used to work... That might be my fault. I've modified the root mount mechanism to only wait for the root mount tokens (ie USB) if the root device isn't already there; basically this makes the kernel not wait for USB if rootfs is on SATA. Does the following fix things for you? (Note there's something seriously wrong with character echo, but it doesn't seem related.) Index: svn/head/sys/kern/vfs_mountroot.c =================================================================== --- svn/head/sys/kern/vfs_mountroot.c (revision 297053) +++ svn/head/sys/kern/vfs_mountroot.c (working copy) @@ -89,6 +89,7 @@ __FBSDID("$FreeBSD$"); static int parse_mount(char **); static struct mntarg *parse_mountroot_options(struct mntarg *, const char *); static int sysctl_vfs_root_mount_hold(SYSCTL_HANDLER_ARGS); +static void vfs_mountroot_wait(void); static int vfs_mountroot_wait_if_neccessary(const char *fs, const char *dev); /* @@ -488,6 +489,8 @@ parse_dir_ask(char **conf) char *mnt; int error; + vfs_mountroot_wait(); + printf("\nLoader variables:\n"); parse_dir_ask_printenv("vfs.root.mountfrom"); parse_dir_ask_printenv("vfs.root.mountfrom.options");