On Sun, Jun 25, 2006 at 07:23:26PM -0400, Jeff Garzik wrote: > Andi created a patch at my suggestion: > http://one.firstfloor.org/~andi/sil-debug > > and that got him mounting the device, but the EH was still giving him > much pain: > http://one.firstfloor.org/~andi/sata-error-loop > > It looks like some condition isn't getting ack'd... Weird. To me, it almost seems like BMDMA2 is lying about whether it generated interrupt or not. e.g. It's sharing IRQ w/ another device, but when the other device raises interrupt, BMDMA2 says it generated the IRQ. Once frozen, new EH does pretty good job of clearing status and the interrupts seem too sporadic to be unacked IRQ. Andi, can you pleaes try the following patch? It makes sata_sil print more data on errors and disables SATA PHY IRQ. Thanks. diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index bc9f918..cd96891 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c @@ -341,8 +341,11 @@ static void sil_scr_write (struct ata_po static void sil_host_intr(struct ata_port *ap, u32 bmdma2) { struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); + u32 bmdma; u8 status; + bmdma = readl(ap->host_set->mmio_base + sil_port[ap->port_no].bmdma); + if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) { u32 serror; @@ -363,11 +366,18 @@ static void sil_host_intr(struct ata_por ap->eh_info.serror |= serror; } + ata_port_printk(ap, KERN_ERR, + "SIL freeze 1, bmdma=%x bmdma2=%x serr=%x\n", + bmdma, bmdma2, serror); goto freeze; } - if (unlikely(!qc || qc->tf.ctl & ATA_NIEN)) + if (unlikely(!qc || qc->tf.ctl & ATA_NIEN)) { + ata_port_printk(ap, KERN_ERR, + "SIL freeze 2, bmdma=%x bmdma2=%x\n", + bmdma, bmdma2); goto freeze; + } /* Check whether we are expecting interrupt in this state */ switch (ap->hsm_task_state) { @@ -398,13 +408,18 @@ static void sil_host_intr(struct ata_por case HSM_ST: break; default: + ata_port_printk(ap, KERN_ERR, "SIL hsm 1, bmdma=%x bmdma2=%x\n", + bmdma, bmdma2); goto err_hsm; } /* check main status, clearing INTRQ */ status = ata_chk_status(ap); - if (unlikely(status & ATA_BUSY)) + if (unlikely(status & ATA_BUSY)) { + ata_port_printk(ap, KERN_ERR, "SIL hsm 2, bmdma=%x bmdma2=%x\n", + bmdma, bmdma2); goto err_hsm; + } /* ack bmdma irq events */ ata_bmdma_irq_clear(ap); @@ -475,7 +490,7 @@ static void sil_thaw(struct ata_port *ap ata_bmdma_irq_clear(ap); /* turn on SATA IRQ */ - writel(SIL_SIEN_N, mmio_base + sil_port[ap->port_no].sien); + /*writel(SIL_SIEN_N, mmio_base + sil_port[ap->port_no].sien);*/ /* turn on IRQ */ tmp = readl(mmio_base + SIL_SYSCFG); - : 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