initial commit with v2.6.32.60
[linux-2.6.32.60-moxart.git] / drivers / scsi / scsi_wait_scan.c
blob5c22bdae63521efd968d84183e5534f8f1e980bf
1 /*
2 * scsi_wait_scan.c
4 * Copyright (C) 2006 James Bottomley <James.Bottomley@SteelEye.com>
6 * This is a simple module to wait until all the async scans are
7 * complete. The idea is to use it in initrd/initramfs scripts. You
8 * modprobe it after all the modprobes of the root SCSI drivers and it
9 * will wait until they have all finished scanning their busses before
10 * allowing the boot to proceed
13 #include <linux/module.h>
14 #include <linux/device.h>
15 #include <scsi/scsi_scan.h>
16 #include "scsi_priv.h"
18 static int __init wait_scan_init(void)
21 * First we need to wait for device probing to finish;
22 * the drivers we just loaded might just still be probing
23 * and might not yet have reached the scsi async scanning
25 wait_for_device_probe();
27 * and then we wait for the actual asynchronous scsi scan
28 * to finish.
30 scsi_complete_async_scans();
31 return 0;
34 static void __exit wait_scan_exit(void)
38 MODULE_DESCRIPTION("SCSI wait for scans");
39 MODULE_AUTHOR("James Bottomley");
40 MODULE_LICENSE("GPL");
42 late_initcall(wait_scan_init);
43 module_exit(wait_scan_exit);