diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-09 11:16:14 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-09 11:16:14 -0400 |
commit | c4052da6f0c01a0b059d125d72bb934d0980b798 (patch) | |
tree | ad50a17e4d14b8f6f1773158d956d424575d1712 /drivers/scsi/ahci.c | |
parent | cedc9a478d8c6265879dc3839ef3d4849a709184 (diff) | |
parent | 3d3467f0fdf61a421361c00cf84fcf0f1a6dc1e8 (diff) |
Merge branch 'upstream'
Diffstat (limited to 'drivers/scsi/ahci.c')
-rw-r--r-- | drivers/scsi/ahci.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 6e4bb36f8d7..f0d8f89b5d4 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 * for (i = 0; i < host_set->n_ports; i++) { struct ata_port *ap; - u32 tmp; - VPRINTK("port %u\n", i); + if (!(irq_stat & (1 << i))) + continue; + ap = host_set->ports[i]; - tmp = irq_stat & (1 << i); - if (tmp && ap) { + if (ap) { struct ata_queued_cmd *qc; qc = ata_qc_from_tag(ap, ap->active_tag); - if (ahci_host_intr(ap, qc)) - irq_ack |= (1 << i); + if (!ahci_host_intr(ap, qc)) + if (ata_ratelimit()) { + struct pci_dev *pdev = + to_pci_dev(ap->host_set->dev); + printk(KERN_WARNING + "ahci(%s): unhandled interrupt on port %u\n", + pci_name(pdev), i); + } + + VPRINTK("port %u\n", i); + } else { + VPRINTK("port %u (no irq)\n", i); + if (ata_ratelimit()) { + struct pci_dev *pdev = + to_pci_dev(ap->host_set->dev); + printk(KERN_WARNING + "ahci(%s): interrupt on disabled port %u\n", + pci_name(pdev), i); + } } + + irq_ack |= (1 << i); } if (irq_ack) { |