[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <600D5CB4DFD93545BF61FF01473D11AC125CC945@limkexm2.ad.analog.com>
Date: Tue, 19 Feb 2008 08:58:34 -0000
From: "Hennerich, Michael" <Michael.Hennerich@...log.com>
To: "Thomas Gleixner" <tglx@...utronix.de>,
"Hennerich, Michael" <Michael.Hennerich@...log.com>
Cc: <mingo@...e.hu>, <linux-kernel@...r.kernel.org>
Subject: RE: [BUG][RFC] [GENERIC IRQ] irq_chip_set_defaults shutdown / disable
>From: Thomas Gleixner Montag, 18. Februar 2008 21:38
>
>On Mon, 18 Feb 2008, Hennerich, Michael wrote:
>> >The patch below fixes the shutdown case and keeps the delayed
disable
>> >logic intact.
>>
>> >How did you notice ? I guess you got spurious interrupts after
calling
>> >free_irq(), right ?
>>
>> Exactly
>
>Can you please confirm, whether my version of the fix works for you as
>well.
>
>Thanks,
>
> tglx
Thomas,
Works - no problems.
There was another typo
>+ chip_disable : default_shutdown;
Should be better:
+ chip->disable : default_shutdown;
Best regards,
Michael
Signed-off-by: Michael Hennerich <michael.hennerich@...log.com>
Index: kernel/irq/chip.c
===================================================================
--- kernel/irq/chip.c (revision 4270)
+++ kernel/irq/chip.c (working copy)
@@ -245,7 +245,20 @@
return 0;
}
+
/*
+ * default shutdown function
+ */
+static void default_shutdown(unsigned int irq)
+{
+ struct irq_desc *desc = irq_desc + irq;
+
+ desc->chip->mask(irq);
+ desc->status |= IRQ_MASKED;
+}
+
+
+/*
* Fixup enable/disable function pointers
*/
void irq_chip_set_defaults(struct irq_chip *chip)
@@ -257,7 +270,8 @@
if (!chip->startup)
chip->startup = default_startup;
if (!chip->shutdown)
- chip->shutdown = chip->disable;
+ chip->shutdown = chip->disable != default_disable ?
+ chip->disable : default_shutdown;
if (!chip->name)
chip->name = chip->typename;
if (!chip->end)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists