]> err.no Git - linux-2.6/commitdiff
ahci: always clear all bits in irq_stat
authorTejun Heo <tj@kernel.org>
Fri, 27 Jun 2008 16:49:02 +0000 (01:49 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 4 Jul 2008 13:05:59 +0000 (09:05 -0400)
Some AHCI controllers (ICH7 was reported) set pending bit in
HOST_IRQ_STAT for non-existent ports and when it's not cleared falls
into IRQ storm.  Always clear full irq_stat instead of only the bits
that are handled.  As nothing changes for recognized ports, the risk
of breaking things is pretty low.

Reported and verified by Philipp Thomas in the following suse
bugzilla.

https://bugzilla.novell.com/attachment.cgi?id=215692

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Philipp Thomas <pth@novell.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/ahci.c

index 6a4a2a25d97a6bd258f1fee4c7cad287d7ef8c0d..061817a3a0e5a1ce639cb24e0716c425d2caebb5 100644 (file)
@@ -1777,7 +1777,7 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
        struct ahci_host_priv *hpriv;
        unsigned int i, handled = 0;
        void __iomem *mmio;
-       u32 irq_stat, irq_ack = 0;
+       u32 irq_stat;
 
        VPRINTK("ENTER\n");
 
@@ -1809,14 +1809,11 @@ static irqreturn_t ahci_interrupt(int irq, void *dev_instance)
                                        "interrupt on disabled port %u\n", i);
                }
 
-               irq_ack |= (1 << i);
-       }
-
-       if (irq_ack) {
-               writel(irq_ack, mmio + HOST_IRQ_STAT);
                handled = 1;
        }
 
+       writel(irq_stat, mmio + HOST_IRQ_STAT);
+
        spin_unlock(&host->lock);
 
        VPRINTK("EXIT\n");