aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ahci.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-09 11:16:14 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-10-09 11:16:14 -0400
commitc4052da6f0c01a0b059d125d72bb934d0980b798 (patch)
treead50a17e4d14b8f6f1773158d956d424575d1712 /drivers/scsi/ahci.c
parentcedc9a478d8c6265879dc3839ef3d4849a709184 (diff)
parent3d3467f0fdf61a421361c00cf84fcf0f1a6dc1e8 (diff)
Merge branch 'upstream'
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r--drivers/scsi/ahci.c31
1 files changed, 25 insertions, 6 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 6e4bb36f8d7c..f0d8f89b5d40 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -680,17 +680,36 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs *
680 680
681 for (i = 0; i < host_set->n_ports; i++) { 681 for (i = 0; i < host_set->n_ports; i++) {
682 struct ata_port *ap; 682 struct ata_port *ap;
683 u32 tmp;
684 683
685 VPRINTK("port %u\n", i); 684 if (!(irq_stat & (1 << i)))
685 continue;
686
686 ap = host_set->ports[i]; 687 ap = host_set->ports[i];
687 tmp = irq_stat & (1 << i); 688 if (ap) {
688 if (tmp && ap) {
689 struct ata_queued_cmd *qc; 689 struct ata_queued_cmd *qc;
690 qc = ata_qc_from_tag(ap, ap->active_tag); 690 qc = ata_qc_from_tag(ap, ap->active_tag);
691 if (ahci_host_intr(ap, qc)) 691 if (!ahci_host_intr(ap, qc))
692 irq_ack |= (1 << i); 692 if (ata_ratelimit()) {
693 struct pci_dev *pdev =
694 to_pci_dev(ap->host_set->dev);
695 printk(KERN_WARNING
696 "ahci(%s): unhandled interrupt on port %u\n",
697 pci_name(pdev), i);
698 }
699
700 VPRINTK("port %u\n", i);
701 } else {
702 VPRINTK("port %u (no irq)\n", i);
703 if (ata_ratelimit()) {
704 struct pci_dev *pdev =
705 to_pci_dev(ap->host_set->dev);
706 printk(KERN_WARNING
707 "ahci(%s): interrupt on disabled port %u\n",
708 pci_name(pdev), i);
709 }
693 } 710 }
711
712 irq_ack |= (1 << i);
694 } 713 }
695 714
696 if (irq_ack) { 715 if (irq_ack) {