]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[PATCH] ahci: add PIOS interim interrupt handling
authorTejun Heo <htejun@gmail.com>
Mon, 15 May 2006 11:58:30 +0000 (20:58 +0900)
committerTejun Heo <htejun@gmail.com>
Mon, 15 May 2006 11:58:30 +0000 (20:58 +0900)
During multiblock PIO, multiple PIOS interrupts are generated before
qc compltion.  Current code prints unnecessary message for such cases.
This is exposed when new EH slows down attached device into PIO mode.

Signed-off-by: Tejun Heo <htejun@gmail.com>
drivers/scsi/ahci.c

index d6894bd67980001509fbdda877b337feabae1217..35487e30b0ff929306ab9738958ee63f85a2b7f6 100644 (file)
@@ -883,7 +883,18 @@ static void ahci_host_intr(struct ata_port *ap)
                }
        }
 
-       /* spurious interrupt */
+       /* hmmm... a spurious interupt */
+
+       /* ignore interim PIO setup fis interrupts */
+       if (ata_tag_valid(ap->active_tag)) {
+               struct ata_queued_cmd *qc =
+                       ata_qc_from_tag(ap, ap->active_tag);
+
+               if (qc && qc->tf.protocol == ATA_PROT_PIO &&
+                   (status & PORT_IRQ_PIOS_FIS))
+                       return;
+       }
+
        if (ata_ratelimit())
                ata_port_printk(ap, KERN_INFO, "spurious interrupt "
                                "(irq_stat 0x%x active_tag %d)\n",