Date: Fri, 05 Feb 2010 20:31:32 +0100 From: Florian Kruegl <smeagle@bsdler.de> To: Adrian Chadd <adrian.chadd@gmail.com> Cc: freebsd-mips@freebsd.org Subject: Re: rspro board and mounting root from SD Message-ID: <1265398292.2149.3.camel@brain.lan.terror.local> In-Reply-To: <d763ac661002042128g4eec226fue4011dc3195a86b@mail.gmail.com> References: <d763ac661002042109o4522e5c1ia2eb51cf199bec75@mail.gmail.com> <20100204.222438.246077296855181113.imp@bsdimp.com> <d763ac661002042128g4eec226fue4011dc3195a86b@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Adrian,
got it running from sd card for a few month now without probs. Flash
seemed to small for putting freebsd on.
seems to be a reace condition until usb mas registers scsi device.
one second is nuff...
brain:head> svn diff
Index: sys/kern/vfs_mount.c
===================================================================
--- sys/kern/vfs_mount.c (revision 203445)
+++ sys/kern/vfs_mount.c (working copy)
@@ -72,6 +72,9 @@
#define ROOTNAME "root_device"
#define VFS_MOUNTARG_SIZE_MAX (1024 * 64)
+static int mount_root_delay = 4;
+TUNABLE_INT("mount_root_delay", &mount_root_delay);
+
static void set_rootvnode(void);
static int vfs_domount(struct thread *td, const char *fstype,
char *fspath, int fsflags, void *fsdata);
@@ -1409,13 +1412,18 @@
PICKUP_GIANT();
mtx_lock(&mountlist_mtx);
if (LIST_EMPTY(&root_holds)) {
- mtx_unlock(&mountlist_mtx);
- break;
+ if(0 == mount_root_delay--) {
+ mtx_unlock(&mountlist_mtx);
+ break;
+ }
}
if (ppsratecheck(&lastfail, &curfail, 1)) {
printf("Root mount waiting for:");
LIST_FOREACH(h, &root_holds, list)
printf(" %s", h->who);
+ if(LIST_EMPTY(&root_holds)) {
+ printf(" %d secs...", mount_root_delay);
+ }
printf("\n");
}
msleep(&root_holds, &mountlist_mtx, PZERO | PDROP, "roothold",
On Fri, 2010-02-05 at 13:28 +0800, Adrian Chadd wrote:
> On 5 February 2010 13:24, M. Warner Losh <imp@bsdimp.com> wrote:
>
> > : 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?
>
> After the call to umass_cam_attach() in umass_attach()
>
>
>
>
> Adrian
> _______________________________________________
> freebsd-mips@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
> To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org"
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1265398292.2149.3.camel>
