From: "Jan Beulich" <jbeulich@novell.com>
To: <mpt_linux_developer@lsil.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] mpt_interrupt() should return IRQ_NONE when appropriate
Date: Wed, 26 Apr 2006 15:58:45 +0200 [thread overview]
Message-ID: <444F98B5.76E4.0078.0@novell.com> (raw)
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>
diff -Npru /home/jbeulich/tmp/linux-2.6.17-rc2/drivers/message/fusion/mptbase.c
2.6.17-rc2-mpt_interrupt/drivers/message/fusion/mptbase.c
--- /home/jbeulich/tmp/linux-2.6.17-rc2/drivers/message/fusion/mptbase.c 2006-04-26 11:50:44.000000000 +0200
+++ 2.6.17-rc2-mpt_interrupt/drivers/message/fusion/mptbase.c 2006-04-25 15:04:48.000000000 +0200
@@ -372,20 +372,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;
}
reply other threads:[~2006-04-26 13:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=444F98B5.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpt_linux_developer@lsil.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome