]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[SCSI] mptbase: mpt_interrupt should return IRQ_NONE
authorEric Moore <eric.moore@lsil.com>
Thu, 29 Jun 2006 23:38:43 +0000 (17:38 -0600)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 1 Jul 2006 02:29:23 +0000 (21:29 -0500)
The way mpt_interrupt() was coded, it was impossible for the unhandled
interrupt detection logic to ever trigger. All interrupt handlers should
return IRQ_NONE when they have nothing to do.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.com>
Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/message/fusion/mptbase.c

index 8ac77caf9337e611e1dfd0f9474e2a812e0513f3..20609966c2a95ac81e69750059721760abad2d9d 100644 (file)
@@ -369,20 +369,21 @@ static irqreturn_t
 mpt_interrupt(int irq, void *bus_id, struct pt_regs *r)
 {
        MPT_ADAPTER *ioc = bus_id;
-       u32 pa;
+       u32 pa = CHIPREG_READ32_dmasync(&ioc->chip->ReplyFifo);
+
+       if (pa == 0xFFFFFFFF)
+               return IRQ_NONE;
 
        /*
         *  Drain the reply FIFO!
         */
-       while (1) {
-               pa = CHIPREG_READ32_dmasync(&ioc->chip->ReplyFifo);
-               if (pa == 0xFFFFFFFF)
-                       return IRQ_HANDLED;
-               else if (pa & MPI_ADDRESS_REPLY_A_BIT)
+       do {
+               if (pa & MPI_ADDRESS_REPLY_A_BIT)
                        mpt_reply(ioc, pa);
                else
                        mpt_turbo_reply(ioc, pa);
-       }
+               pa = CHIPREG_READ32_dmasync(&ioc->chip->ReplyFifo);
+       } while (pa != 0xFFFFFFFF);
 
        return IRQ_HANDLED;
 }