From: Hugh Dickins CONFIG_MODULES=y CONFIG_SCSI=y CONFIG_SCSI_SCAN_ASYNC=y CONFIG_SCSI_WAIT_SCAN=m 2.6.21-rc5-mm2 VFS panics unable to find my root on /dev/sda2, but boots okay if I change drivers/scsi/Kconfig to "default y" instead of "default m" for SCSI_WAIT_SCAN. Make sure there's a late_initcall to scsi_complete_async_scans when it's built in, so a monolithic SCSI_SCAN_ASYNC kernel can rely on the scans being completed before trying to mount root, even if they're slow. Signed-off-by: Hugh Dickins Cc: James Bottomley Signed-off-by: Andrew Morton --- drivers/scsi/scsi_scan.c | 1 + 1 files changed, 1 insertion(+) diff -puN drivers/scsi/scsi_scan.c~scsi-fix-config_scsi_wait_scan=m drivers/scsi/scsi_scan.c --- a/drivers/scsi/scsi_scan.c~scsi-fix-config_scsi_wait_scan=m +++ a/drivers/scsi/scsi_scan.c @@ -183,6 +183,7 @@ int scsi_complete_async_scans(void) /* Only exported for the benefit of scsi_wait_scan */ EXPORT_SYMBOL_GPL(scsi_complete_async_scans); +late_initcall(scsi_complete_async_scans); /** * scsi_unlock_floptical - unlock device via a special MODE SENSE command _