]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/irq/spurious.c
tcp: fix skb vs fack_count out-of-sync condition
[linux-2.6-omap-h63xx.git] / kernel / irq / spurious.c
index a6b2bc831dd05be5ee9cbff347566bf410870c26..c66d3f10e85326ab1041a29202047734769b9b10 100644 (file)
@@ -6,6 +6,7 @@
  * This file contains spurious interrupt handling.
  */
 
+#include <linux/jiffies.h>
 #include <linux/irq.h>
 #include <linux/module.h>
 #include <linux/kallsyms.h>
@@ -179,7 +180,7 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc,
                 * otherwise the couter becomes a doomsday timer for otherwise
                 * working systems
                 */
-               if (jiffies - desc->last_unhandled > HZ/10)
+               if (time_after(jiffies, desc->last_unhandled + HZ/10))
                        desc->irqs_unhandled = 1;
                else
                        desc->irqs_unhandled++;
@@ -208,8 +209,8 @@ void note_interrupt(unsigned int irq, struct irq_desc *desc,
                 * Now kill the IRQ
                 */
                printk(KERN_EMERG "Disabling IRQ #%d\n", irq);
-               desc->status |= IRQ_DISABLED;
-               desc->depth = 1;
+               desc->status |= IRQ_DISABLED | IRQ_SPURIOUS_DISABLED;
+               desc->depth++;
                desc->chip->disable(irq);
        }
        desc->irqs_unhandled = 0;