diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2007-10-04 10:52:40 +0400 |
---|---|---|
committer | Jens Axboe <axboe@carl.home.kernel.dk> | 2007-10-10 11:26:00 +0400 |
commit | d2bbf3da3759d04cd5836955cc59c8ae96092831 (patch) | |
tree | 8fa462dc477c4e9bf01a340b4230814b98f38273 | |
parent | b5515d86f2efd4dd3516c16c17c1a611a5800b19 (diff) | |
download | linux-d2bbf3da3759d04cd5836955cc59c8ae96092831.tar.xz |
Sysace: Don't enable IRQ until after interrupt handler is registered
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>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r-- | 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 5b73471ada78..9e7652dcde6c 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); |