mirror of
https://github.com/adulau/aha.git
synced 2025-01-02 14:13:18 +00:00
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>
This commit is contained in:
parent
c7ef5da35a
commit
df45517536
1 changed files with 8 additions and 7 deletions
|
@ -484,21 +484,22 @@ void tsi148_free_irq(int level, int statid)
|
||||||
/* Get semaphore */
|
/* Get semaphore */
|
||||||
down(&(vme_irq));
|
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--;
|
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) {
|
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 = ioread32be(tsi148_bridge->base + TSI148_LCSR_INTEN);
|
||||||
tmp &= ~TSI148_LCSR_INTEN_IRQEN[level - 1];
|
tmp &= ~TSI148_LCSR_INTEN_IRQEN[level - 1];
|
||||||
iowrite32be(tmp, tsi148_bridge->base + TSI148_LCSR_INTEN);
|
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 */
|
/* Release semaphore */
|
||||||
up(&(vme_irq));
|
up(&(vme_irq));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue