From: Grant Likely <grant.likely@secretlab.ca>
To: jens.axboe@oracle.com, linux-kernel@vger.kernel.org,
linuxppc-dev@ozlabs.org
Subject: [PATCH 3/3] Sysace: Don't enable IRQ until after interrupt handler is registered
Date: Wed, 03 Oct 2007 22:13:28 -0600 [thread overview]
Message-ID: <20071004041328.20868.98483.stgit@trillian.cg.shawcable.net> (raw)
In-Reply-To: <20071004041114.20868.34605.stgit@trillian.cg.shawcable.net>
From: Grant Likely <grant.likely@secretlab.ca>
The previous patch to move the interrupt handler registration moved it
below enabling interrupts which could be a problem if the device is on
a shared interrupt line. This patch fixes the order.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
drivers/block/xsysace.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index 5b73471..9e7652d 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1005,11 +1005,6 @@ static int __devinit ace_setup(struct ace_device *ace)
ace_out(ace, ACE_CTRL, ACE_CTRL_FORCECFGMODE |
ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ);
- /* Enable interrupts */
- val = ace_in(ace, ACE_CTRL);
- val |= ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ;
- ace_out(ace, ACE_CTRL, val);
-
/* Now we can hook up the irq handler */
if (ace->irq != NO_IRQ) {
rc = request_irq(ace->irq, ace_interrupt, 0, "systemace", ace);
@@ -1020,6 +1015,11 @@ static int __devinit ace_setup(struct ace_device *ace)
}
}
+ /* Enable interrupts */
+ val = ace_in(ace, ACE_CTRL);
+ val |= ACE_CTRL_DATABUFRDYIRQ | ACE_CTRL_ERRORIRQ;
+ ace_out(ace, ACE_CTRL, val);
+
/* Print the identification */
dev_info(ace->dev, "Xilinx SystemACE revision %i.%i.%i\n",
(version >> 12) & 0xf, (version >> 8) & 0x0f, version & 0xff);
next prev parent reply other threads:[~2007-10-04 4:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-04 4:13 [PATCH 0/3] Fixups to SystemACE driver Grant Likely
2007-10-04 4:13 ` [PATCH 1/3] Sysace: Minor coding convention fixup Grant Likely
2007-10-04 4:13 ` [PATCH 2/3] Sysace: sparse fixes Grant Likely
2007-10-04 4:13 ` Grant Likely [this message]
2007-10-04 6:53 ` [PATCH 0/3] Fixups to SystemACE driver Jens Axboe
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=20071004041328.20868.98483.stgit@trillian.cg.shawcable.net \
--to=grant.likely@secretlab.ca \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/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