]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] sil24: add testing for PCI fault
authorTejun Heo <htejun@gmail.com>
Wed, 17 Aug 2005 04:08:52 +0000 (13:08 +0900)
committerJeff Garzik <jgarzik@pobox.com>
Wed, 17 Aug 2005 04:51:50 +0000 (00:51 -0400)
03_sil24_add-pci-fault-check.patch

On entry to interrupt handler, PORT_SLOT_STAT register is read
        first.  Check if PCI fault or device removal has occurred by
        testing the value for 0xffffffff.

Signed-off-by: Tejun Heo <htejun@gmail.com>
 sata_sil24.c |    6 ++++++
 1 files changed, 6 insertions(+)
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/scsi/sata_sil24.c

index 0f810cdd3cc22288e2fd99e87e4d015e29e19884..c9318bda46a3cc282bc06bf12148afc250ba648a 100644 (file)
@@ -527,6 +527,12 @@ static irqreturn_t sil24_interrupt(int irq, void *dev_instance, struct pt_regs *
 
        status = readl(hpriv->host_base + HOST_IRQ_STAT);
 
+       if (status == 0xffffffff) {
+               printk(KERN_ERR DRV_NAME ": IRQ status == 0xffffffff, "
+                      "PCI fault or device removal?\n");
+               goto out;
+       }
+
        if (!(status & IRQ_STAT_4PORTS))
                goto out;