This patch (as1246) fixes a bug in the scsi_wait_scan module. It's supposed to wait until all SCSI probing is finished -- but it doesn't, because of sd_probe_async(). This routine is run by async_schedule(), not the SCSI async mechanism. Consequently we have to make an extra call to async_synchronize_full() to wait for it. Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> CC: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx> --- Index: usb-2.6/drivers/scsi/scsi_wait_scan.c =================================================================== --- usb-2.6.orig/drivers/scsi/scsi_wait_scan.c +++ usb-2.6/drivers/scsi/scsi_wait_scan.c @@ -12,6 +12,7 @@ #include <linux/module.h> #include <linux/device.h> +#include <linux/async.h> #include <scsi/scsi_scan.h> static int __init wait_scan_init(void) @@ -27,6 +28,13 @@ static int __init wait_scan_init(void) * to finish. */ scsi_complete_async_scans(); + /* + * If any of those asynchronous SCSI scans called sd_probe() + * then it probably queued another job to run sd_probe_async(). + * Wait for that to finish. + */ + async_synchronize_full(); + return 0; } -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html