Make user scan wait for scan to complete. This way user can wait for warm plug request to complete and is prevented from causing EH event storm by repetitively issuing scan request while EH is in progress. Signed-off-by: Tejun Heo <htejun@xxxxxxxxx> Cc: Fajun Chen <fajunchen@xxxxxxxxx> diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 3986ec8..e1fe832 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3138,10 +3138,12 @@ static int ata_scsi_user_scan(struct Scs rc = -EINVAL; } - if (rc == 0) + if (rc == 0) { ata_port_schedule_eh(ap); - - spin_unlock_irqrestore(ap->lock, flags); + spin_unlock_irqrestore(ap->lock, flags); + ata_port_wait_eh(ap); + } else + spin_unlock_irqrestore(ap->lock, flags); return rc; } - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html