* [PATCH #upstream-fixes] ahci: always clear all bits in irq_stat
@ 2008-06-27 16:49 Tejun Heo
2008-07-04 13:11 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2008-06-27 16:49 UTC (permalink / raw)
To: Jeff Garzik, IDE/ATA development list, pth
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>
---
This should fix some of ahci IRQ storms we have. I'm not sure it
fixes the JMB probing one tho. I think this one is worth committing
to #upstream-fixes and should be safe.
Thanks.
drivers/ata/ahci.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 966ab40..8378334 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -1760,7 +1760,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");
@@ -1792,14 +1792,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");
--
tejun
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH #upstream-fixes] ahci: always clear all bits in irq_stat
2008-06-27 16:49 [PATCH #upstream-fixes] ahci: always clear all bits in irq_stat Tejun Heo
@ 2008-07-04 13:11 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-07-04 13:11 UTC (permalink / raw)
To: Tejun Heo; +Cc: IDE/ATA development list, pth
Tejun Heo wrote:
> 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>
> ---
> This should fix some of ahci IRQ storms we have. I'm not sure it
> fixes the JMB probing one tho. I think this one is worth committing
> to #upstream-fixes and should be safe.
>
> Thanks.
>
> drivers/ata/ahci.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index 966ab40..8378334 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -1760,7 +1760,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");
>
> @@ -1792,14 +1792,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);
>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-04 13:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-27 16:49 [PATCH #upstream-fixes] ahci: always clear all bits in irq_stat Tejun Heo
2008-07-04 13:11 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).