rspro board and mounting root from SD

Adrian Chadd adrian.chadd at gmail.com
Tue Feb 16 06:24:52 UTC 2010


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 at 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 at 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 at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-mips
>> To unsubscribe, send any mail to "freebsd-mips-unsubscribe at freebsd.org"
>>
>
>
>


More information about the freebsd-mips mailing list