linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata: make user scan wait for scan to complete
@ 2006-09-30  9:07 Tejun Heo
  2006-10-05 11:22 ` Jeff Garzik
  2006-11-01  5:17 ` Jeff Garzik
  0 siblings, 2 replies; 4+ messages in thread
From: Tejun Heo @ 2006-09-30  9:07 UTC (permalink / raw)
  To: Jeff Garzik, linux-ide; +Cc: fajunchen

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@gmail.com>
Cc: Fajun Chen <fajunchen@gmail.com>

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;
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-11-01  5:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-30  9:07 [PATCH] libata: make user scan wait for scan to complete Tejun Heo
2006-10-05 11:22 ` Jeff Garzik
2006-10-08  4:17   ` Tejun Heo
2006-11-01  5:17 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).