From a2b579620dd7947b8f90d1311c7e87a57ec9f1ea Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 13 Sep 2009 11:00:17 -0700 Subject: [PATCH] DEVFS - Wait an extra 2 seconds before looking for the root mount * Some drivers pickup devices asynchronously in a manner which the intitial CAM probe does not cover. Try to give these drivers a little extra time to pickup devices before mounting root. This is a hack. --- sys/kern/vfs_conf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c index a159afc3a3..3b2b7c01f6 100644 --- a/sys/kern/vfs_conf.c +++ b/sys/kern/vfs_conf.c @@ -109,8 +109,9 @@ SYSINIT(mountroot, SI_SUB_MOUNT_ROOT, SI_ORDER_SECOND, vfs_mountroot, NULL); static void vfs_mountroot(void *junk) { - int i; cdev_t save_rootdev = rootdev; + int i; + int dummy; /* * Make sure all disk devices created so far have also been probed, @@ -119,8 +120,14 @@ vfs_mountroot(void *junk) * * Messages can fly around here so get good synchronization * coverage. + * + * XXX - Delay an additional 2 seconds to help drivers which pickup + * devices asynchronously and are not caught by CAM's initial + * probe. */ sync_devs(); + tsleep(&dummy, 0, "syncer", hz*2); + /* * The root filesystem information is compiled in, and we are -- 2.11.4.GIT