From owner-freebsd-usb@FreeBSD.ORG Mon Feb 16 23:52:11 2009 Return-Path: Delivered-To: usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 644ED106564A for ; Mon, 16 Feb 2009 23:52:11 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout015.mac.com (asmtpout015.mac.com [17.148.16.90]) by mx1.freebsd.org (Postfix) with ESMTP id 511B58FC12 for ; Mon, 16 Feb 2009 23:52:11 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed Received: from mnatesan-lt2.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp015.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KF6006N9NMX1660@asmtp015.mac.com> for usb@freebsd.org; Mon, 16 Feb 2009 15:52:11 -0800 (PST) Message-id: <741FAA3B-B91A-4A23-B47F-21141A8D0B5D@mac.com> From: Marcel Moolenaar To: "M. Warner Losh" In-reply-to: <20090216.161346.1176917525.imp@bsdimp.com> Date: Mon, 16 Feb 2009 15:52:08 -0800 References: <20090216.161346.1176917525.imp@bsdimp.com> X-Mailer: Apple Mail (2.930.3) Cc: 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: Mon, 16 Feb 2009 23:52:11 -0000 On Feb 16, 2009, at 3:13 PM, M. Warner Losh wrote: > In message: > Marcel Moolenaar writes: > : Before I dig into the code, what's the current status of > : root mounts on USB mass storage devices? > > First, there's a kludge-o-round that is similar to your "sleep 10" > that you've added. It loops waiting for more devices to show up if > the desired root file system hasn't appeared yet. > > There's no way for hot-plug busses to tell the kernel "I've tried my > best to enumerate everything on my bus, and I'm done" Of course there is. Any and all USB hubs have a certain number of ports. You can trivially iterate over all of them and declare completion when you've tried them all. Recursion is also not a big deal. When you find a HUB underneath a port, you iterate over all the ports of that downstream hub before you declare completion of the USB discovery process. When the USB discovery process is done, you release the root mount lock... So what's the problem? -- Marcel Moolenaar xcllnt@mac.com