From owner-freebsd-mips@FreeBSD.ORG Wed Feb 17 21:34:12 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 683F3106566B for ; Wed, 17 Feb 2010 21:34:12 +0000 (UTC) (envelope-from smeagle@bsdler.de) Received: from hell.bsdler.de (hell-fe0.v6.bsdler.de [IPv6:2001:780:0:19::1]) by mx1.freebsd.org (Postfix) with ESMTP id ED62C8FC14 for ; Wed, 17 Feb 2010 21:34:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hell.bsdler.de (Postfix) with ESMTP id E6975B873 for ; Wed, 17 Feb 2010 22:34:09 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdler.de Received: from hell.bsdler.de ([127.0.0.1]) by localhost (hell.bsdler.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id rKlNfx3htUMM for ; Wed, 17 Feb 2010 22:34:09 +0100 (CET) Received: from kiste.lan.terror.local (p4FF0B265.dip.t-dialin.net [79.240.178.101]) by hell.bsdler.de (Postfix) with ESMTPSA id 04483B872 for ; Wed, 17 Feb 2010 22:34:09 +0100 (CET) Received: from [172.17.21.80] (brain.lan.terror.local [172.17.21.80]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by kiste.lan.terror.local (Postfix) with ESMTPS id EDBC9535B7 for ; Wed, 17 Feb 2010 22:34:07 +0100 (CET) From: Florian Kruegl To: freebsd-mips@freebsd.org In-Reply-To: <20100215.234202.119882392285831214.imp@bsdimp.com> References: <1265398292.2149.3.camel@brain.lan.terror.local> <20100215.234202.119882392285831214.imp@bsdimp.com> Content-Type: text/plain; charset="ASCII" Date: Wed, 17 Feb 2010 22:31:37 +0100 Message-ID: <1266442297.2149.30.camel@brain.lan.terror.local> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Re: rspro board and mounting root from SD X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: smeagle@bsdler.de List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2010 21:34:12 -0000 Hi, On Mon, 2010-02-15 at 23:42 -0700, M. Warner Losh wrote: > In message: > Adrian Chadd writes: > : Thanks, I'll just (ab)use this method of delaying the root mounting > : hackery until the umass child gets a chance to finishing probing. > : it's definetly a rude hack, given the fact that there is already another hack in place doing the same make it even pointless... > > : A "better" solution (eg enumerating which USB children need to finish > : probing and adding them in with relevant notification) may take a bit > : more hackery than I was hoping for. Maybe slicing something hackish > : into CAM would be evil but more generic.. > > There is something hackish already in CAM, sadly. kern.cam.boot_delay > looks like it defaults to '0' but you could set it to 4 I think to get > the same net-net as this patch. I tried getting in deeper, but the problem seems that for a short period there is no root lock pending as usb has already finished and cam has not yet set the lock. I dislike the approach it was annoying when SCSI devices where installed, but it wanted to get it up and running as quick as possible. However there is currently not much use in booting from SD as kernel spits out masses of geom 'messages' =================================================================== g_vfs_done():da0s1a[WRITE(offset=81920, length=8192)]error = 5 g_vfs_done():da0s1a[WRITE(offset=397312000, length=8192)]error = 5 g_vfs_done():da0s1a[WRITE(offset=49152, length=8192)]error = 5 =================================================================== this has kind of shifted, 4 weeks ago there where plenty of USB errors. The sad thing is that I now seems to corrupt data. or at least reads are failing: =================================================================== Trying to mount root from ufs:/dev/da0s1a Invalid time in real time clock. Check and reset the date immediately! (da0:umass-sim0:0:0:0): AutoSense failed g_vfs_done():da0s1a[READ(offset=28352512, length=8192)]error = 5 g_vfs_done():da0s1a[READ(offset=28262400, length=90112)]error = 5 Setting hostuuid: 30cfc620-19d2-11df-9ee8-000000004661. Setting hostid: 0xfbd78019. Entropy harvesting: interrupts ethernet point_to_point(da0:umass-sim0:0:0:0): AutoSense failed g_vfs_done():da0s1a[READ(offset=24690688, length=65536)]error = 5 g_vfs_done():da0s1a[READ(offset=27156480, length=1024)]error = 5 vnode_pager_getpages: I/O read error input in flex scanner failed (da0:umass-sim0:0:0:0): AutoSense failed g_vfs_done():da0s1a[READ(offset=204086272, length=1024)]error = 5 g_vfs_done():da0s1a[READ(offset=172403712, length=4096)]error = 5 (da0:umass-sim0:0:0:0): AutoSense failed g_vfs_done():da0s1a[READ(offset=113606656, length=8192)]error = 5 kickstart. Starting file system checks: =================================================================== rc.d scripts fail with premature end of script errors and situation gets worse when FS is mounted rw. System fails o remount rw due to device busy. when requesting a sync the kernel keeps complaining about the same ranges. Will try with current version as soon as build world finishes. > > I've talked through a bunch of solutions with Scott, and I think we > concluded that the right approach was for CAM to evolve a little. > As SIMs are discovered, they are added to a list of things to probe > (if their transport is polled, rather than self-discovered). Then, > after the interrupt hooks are done, it would run through the list > polling those SIMs. Once that's done, we'd release the hounds, errr, > I mean we'd allow mount_root to proceed. i thing allowing root mount is where most problems start ;) Flo > > Warner >