linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sata_sil: update device hotplug handling
@ 2006-06-12  5:18 Tejun Heo
  2006-06-12  6:08 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2006-06-12  5:18 UTC (permalink / raw)
  To: Jeff Garzik, linux-ide

Some flavors of 3112 cannot mask SATA_IRQ reliably and ends up
scheduling hotplug event during hardreset.  This patch makes sata_sil
simply use SError hotplug event handling in libata core layer.

This patch also makes sil_interrupt() clear interrupt before freezing.
Without this, some 3112 controllers cause interrupt storms.

Signed-off-by: Tejun Heo <htejun@gmail.com>

---

 drivers/scsi/sata_sil.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

3338e8a25e5245a3aad7ad0d4d79a44faa918eb2
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
index 0898cbe..00906ab 100644
--- a/drivers/scsi/sata_sil.c
+++ b/drivers/scsi/sata_sil.c
@@ -343,12 +343,8 @@ static void sil_host_intr(struct ata_por
 	struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag);
 	u8 status;
 
-	if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) {
-		ata_ehi_hotplugged(&ap->eh_info);
-		goto freeze;
-	}
-
-	if (unlikely(!qc || qc->tf.ctl & ATA_NIEN))
+	if (unlikely((bmdma2 & SIL_DMA_SATA_IRQ) ||
+		     (!qc || qc->tf.ctl & ATA_NIEN)))
 		goto freeze;
 
 	/* Check whether we are expecting interrupt in this state */
@@ -399,6 +395,7 @@ static void sil_host_intr(struct ata_por
  err_hsm:
 	qc->err_mask |= AC_ERR_HSM;
  freeze:
+	ata_bmdma_irq_clear(ap);
 	ata_port_freeze(ap);
 }
 
-- 
1.3.2


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

end of thread, other threads:[~2006-06-12 13:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-12  5:18 [PATCH] sata_sil: update device hotplug handling Tejun Heo
2006-06-12  6:08 ` Jeff Garzik
2006-06-12  7:42   ` Tejun Heo
2006-06-12  9:45     ` [PATCH] sata_sil: update device hotplug handling, take #2 Tejun Heo
2006-06-12 13:38       ` 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).