From owner-freebsd-usb@FreeBSD.ORG Thu Feb 19 05:02:06 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 3340A106566C for ; Thu, 19 Feb 2009 05:02:06 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from pele.citylink.co.nz (pele.citylink.co.nz [202.8.44.226]) by mx1.freebsd.org (Postfix) with ESMTP id C70918FC16 for ; Thu, 19 Feb 2009 05:02:05 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by pele.citylink.co.nz (Postfix) with ESMTP id B6CC8FF2F; Thu, 19 Feb 2009 18:02:04 +1300 (NZDT) X-Virus-Scanned: Debian amavisd-new at citylink.co.nz Received: from pele.citylink.co.nz ([127.0.0.1]) by localhost (pele.citylink.co.nz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zZa+BwcSUV+e; Thu, 19 Feb 2009 18:02:00 +1300 (NZDT) Received: from citylink.fud.org.nz (unknown [202.8.44.45]) by pele.citylink.co.nz (Postfix) with ESMTP; Thu, 19 Feb 2009 18:02:00 +1300 (NZDT) Received: by citylink.fud.org.nz (Postfix, from userid 1001) id 6F05C1142E; Thu, 19 Feb 2009 18:02:00 +1300 (NZDT) Date: Wed, 18 Feb 2009 21:02:00 -0800 From: Andrew Thompson To: "M. Warner Losh" Message-ID: <20090219050200.GA84647@citylink.fud.org.nz> References: <20090216.190312.1756925299.imp@bsdimp.com> <7F91349C-7E58-47C8-BB69-3B2F391B4E73@mac.com> <200902170856.11631.hselasky@c2i.net> <20090217.085424.775975548.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090217.085424.775975548.imp@bsdimp.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-usb@FreeBSD.org 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: Thu, 19 Feb 2009 05:02:06 -0000 On Tue, Feb 17, 2009 at 08:54:24AM -0700, M. Warner Losh wrote: > In message: <200902170856.11631.hselasky@c2i.net> > Hans Petter Selasky writes: > : On Tuesday 17 February 2009, Marcel Moolenaar wrote: > : > > 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. > > I think this is a weak argument. I'm strongly in favor of the usb1 > behavior here. I think its slightly more complex that adding a cold explore task. Most of the USB2 periperhel drivers defer a portion of their attach to a thread task, a change which needs to be reverted first. As others have said both the probe and attach must be synchronous. Andrew