diff options
author | Martyn Welch <martyn.welch@gefanuc.com> | 2009-08-05 17:38:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:10 -0700 |
commit | df45517536eb010ce2b3c4c7b75c1a02bdb10018 (patch) | |
tree | b60373f1e6cbaad3b4f085ebd8fc792872d145c5 | |
parent | c7ef5da35a5323bf1375eea4dd8e455c0696b206 (diff) |
Staging: vme: Correct tsi-148 VME interrupt free routine
As identified by Jiri, the VME interrupt free routine removes the service
routine before disabling the interrupt. Re-order operations to be performed in
the reverse of the request routine.
Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/vme/bridges/vme_tsi148.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/staging/vme/bridges/vme_tsi148.c b/drivers/staging/vme/bridges/vme_tsi148.c index ad6fc2db437..cdc29198939 100644 --- a/drivers/staging/vme/bridges/vme_tsi148.c +++ b/drivers/staging/vme/bridges/vme_tsi148.c @@ -484,21 +484,22 @@ void tsi148_free_irq(int level, int statid) /* Get semaphore */ down(&(vme_irq)); - tsi148_bridge->irq[level - 1].callback[statid].func = NULL; - tsi148_bridge->irq[level - 1].callback[statid].priv_data = NULL; tsi148_bridge->irq[level - 1].count--; - /* Disable IRQ level */ + /* Disable IRQ level if no more interrupts attached at this level*/ if (tsi148_bridge->irq[level - 1].count == 0) { - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO); - tmp &= ~TSI148_LCSR_INTEO_IRQEO[level - 1]; - iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEO); - tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEN); tmp &= ~TSI148_LCSR_INTEN_IRQEN[level - 1]; iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEN); + + tmp = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEO); + tmp &= ~TSI148_LCSR_INTEO_IRQEO[level - 1]; + iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEO); } + tsi148_bridge->irq[level - 1].callback[statid].func = NULL; + tsi148_bridge->irq[level - 1].callback[statid].priv_data = NULL; + /* Release semaphore */ up(&(vme_irq)); } |