From owner-freebsd-mips@FreeBSD.ORG Fri Feb 5 05:26:20 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE9A71065692 for ; Fri, 5 Feb 2010 05:26:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B24718FC15 for ; Fri, 5 Feb 2010 05:26:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o155NflY000738; Thu, 4 Feb 2010 22:23:41 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Feb 2010 22:24:38 -0700 (MST) Message-Id: <20100204.222438.246077296855181113.imp@bsdimp.com> To: adrian.chadd@gmail.com From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: rspro board and mounting root from SD X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 05:26:21 -0000 In message: Adrian Chadd writes: : Howdy, : : I've been looking at using an SD card as a test root device but it : unfortunately appears that device probing doesn't quite happen fast : enough for the umass device to be enumerated. : : description: : : * system boots : * usbus0 is created - root_mount_hold("usbus0") called : * usbus0 is probed, and umass0 is found/createdcreated : * umass0 probe begins : * root_mount_rel() on usbus0 is called : * nothing else is waiting, so VFS tries mounting the root device : : The SD probe/attach doesn't occur until -after- the root is mounted : and the system begins. : : If I stick a root_mount_hold() call in umass_attach(), the umass : device is given the opportunity to complete probe/attach but obviously : then a lack of root_mount_rel() results in nothing completing. Where did you put this? : Any ideas? My knowledge of USB/CAM internals is currently : non-existant. I couldn't find any particular function/callback which : is called when the umass bus probe completes - as far as I can tell, : attach kicks off some CAM messages which may eventually end up finding : a device or not. I'm not sure of the "right" place to put the release; : or whether I'm on the right track at all. Maybe CAM should have something like this, but I'm not sure. Warner