Date: Tue, 16 Feb 2010 14:24:50 +0800 From: Adrian Chadd <adrian.chadd@gmail.com> To: smeagle@bsdler.de Cc: freebsd-mips@freebsd.org Subject: Re: rspro board and mounting root from SD Message-ID: <d763ac661002152224i7310a0d3q52bd93b64428297a@mail.gmail.com> In-Reply-To: <1265398292.2149.3.camel@brain.lan.terror.local> References: <d763ac661002042109o4522e5c1ia2eb51cf199bec75@mail.gmail.com> <20100204.222438.246077296855181113.imp@bsdimp.com> <d763ac661002042128g4eec226fue4011dc3195a86b@mail.gmail.com> <1265398292.2149.3.camel@brain.lan.terror.local>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks, I'll just (ab)use this method of delaying the root mounting
hackery until the umass child gets a chance to finishing probing.
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..
thanks,
Adrian
On 6 February 2010 03:31, Florian Kruegl <smeagle@bsdler.de> wrote:
> 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?d763ac661002152224i7310a0d3q52bd93b64428297a>
