Subject: [PATCH] MPC85xx: CPM2 interrupt handler failure after 100, 000 interrupts

From: Marcelo Tosatti <[email-masked]>
Date: Fri, 16 Dec 2005 11:46:04 -0200

Hi Kumar,

Please apply.

From: Edson Seabra <[email-masked]>

The CPM2 interrupt handler does not return success to the IRQ subsystem, which 
causes it to kill the IRQ line after 100,000 interrupts.

[root@KVM ~]# create_cf --doformat --factory_default
...
 Copying Linux kernel to /dev/hda1
Initialization of /dev/hda1 done.
 Copying RO file system to /dev/hda5
 Packing dev done.
  Creating directories...
  Creating etc... done.
  Creating home... done.
  Creating root... done.
  Creating mnt... done.
  Creating var... done.
  Creating dev... done.
  Creating tmp... done.
  Creating proc... done.
  Copying directories/files...
  Copying bin... done.
  Copying sbin... done.
  Copying lib... done.
  Copying libexec... done.
  Copying new_web... done.
  Copying opt... done.
  Copying usr... done.
  Copying COPYRIGHTS...
Error in command: 'cp -a /COPYRIGHTS /mnt/hdPart'

[ 1133.542580] Disabling IRQ #94
May 23 16:59:53 s_kernel@KVM [ 1133.542222] irq 94: nobody cared (try
booting with the "irqpoll" option)
May 23 16:59:53 s_kernel@KVM [ 1133.542546] handlers:
May 23 16:59:53 s_kernel@KVM [ 1133.542554] [<c0013ba4>]
(cpm2_cascade+0x0/0x48)

The following patch fixes the problem.

Signed-off-by: Edson Seabra <[email-masked]>
Signed-off-by: Marcelo Tosatti <[email-masked]>

RCS file: /usr/cvsroot/oobi_projects/sources/lsp/linux-2.6.14
/arch/ppc/platforms/85xx/mpc85xx_cds_common.c,v
retrieving revision 1.1
retrieving revision 1.4
diff -u -r1.1 -r1.4
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c        6 Dec 2005 02:56:21 -0000       1.1
+++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c        14 Dec 2005 19:32:57 -0000      1.4
@@ -145,10 +154,11 @@
 }

 #ifdef CONFIG_CPM2
-static void cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
+static int cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
 {
        while((irq = cpm2_get_irq(regs)) >= 0)
                __do_IRQ(irq, regs);
+       return(IRQ_HANDLED);
 }

 static struct irqaction cpm2_irqaction = {