From owner-freebsd-usb@FreeBSD.ORG Tue Feb 17 07:53:44 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0ADD10656F0 for ; Tue, 17 Feb 2009 07:53:44 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swipnet.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id 642398FC21 for ; Tue, 17 Feb 2009 07:53:44 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=EWEeD2KzixNRgShOMSUA:9 a=IJ6HKADzhj2cGB6hJakA:7 a=DtlZGR7vHU-g-ZuY-rOgL-j7gDQA:4 a=LY0hPdMaydYA:10 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1024734557; Tue, 17 Feb 2009 08:53:42 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Tue, 17 Feb 2009 08:56:11 +0100 User-Agent: KMail/1.9.7 References: <741FAA3B-B91A-4A23-B47F-21141A8D0B5D@mac.com> <20090216.190312.1756925299.imp@bsdimp.com> <7F91349C-7E58-47C8-BB69-3B2F391B4E73@mac.com> In-Reply-To: <7F91349C-7E58-47C8-BB69-3B2F391B4E73@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902170856.11631.hselasky@c2i.net> Cc: Subject: Re: USB2+umass: root mount fails X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Feb 2009 07:53:45 -0000 On Tuesday 17 February 2009, Marcel Moolenaar wrote: > On Feb 16, 2009, at 6:03 PM, M. Warner Losh wrote: > > : root_mount_hold() and root_mount_rel() are specifically > > : designed to inform the mountroot code that it needs to > > : wait (or that it should go ahead and mount root). > > > > But it looks like the old usb code didn't call it either... I think > > old code enumerated right away during boot, while the new code defers > > the enumeration until events can be processed... > > Yes, you're right. USB1 used the following: > > SYSINIT(usb_cold_explore, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, > usb_cold_explore, NULL); > > SI_SUB_CONFIGURE didn't complete before all USB busses > were enumerated. I would really prefer that first time USB enumeration is not synchronous. This has to do with startup timing. It simply wastes a lot of time to wait for all the busses to be probed in serial. Sure it works nice with a USB keyboard and a USB mouse, but when you have a couple of USB HUBs and +8 devices connected, it simply speeds up the boot time so that you reach the root prompt by the time you would else have done the mount root mfs. If the mountroot code cannot find the disk, it should sleep and loop. --HPS