[PATCH] sata_sil: update device hotplug handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

---

 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

-
: 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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux