aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2012-12-03 18:15:44 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-07 14:10:02 -0800
commitef6543dbad12c1086f3bc3565d8266352521d8a3 (patch)
tree8d659c7d0914da44e1c8efe6e4c3d590e20b2cc4
parentb652bd83a0528c43e935cb6f2f8df024b7a85c5e (diff)
staging: comedi: addi_apci_2032: only disable triggered interrupts
The interrupt handler disables all interrupt sources when a valid interrupt occurs. Just disable the triggered interrupt source so we can still get interrupts for the other interrupt source. Also add a comment indicating why the triggered interrupt source is disabled. The interrupt sources are level-sensitive and indicate hardware errors that are likely to be persistent, so if we reenabled them they would just keep triggering repeatedly. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_2032.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c
index 4c348dd2a5d..98691fdfbd4 100644
--- a/drivers/staging/comedi/drivers/addi_apci_2032.c
+++ b/drivers/staging/comedi/drivers/addi_apci_2032.c
@@ -246,7 +246,13 @@ static irqreturn_t apci2032_interrupt(int irq, void *d)
return IRQ_NONE;
val = inl(dev->iobase + APCI2032_INT_STATUS_REG) & 3;
- outl(0x00, dev->iobase + APCI2032_INT_CTRL_REG);
+ /* Disable triggered interrupt sources. */
+ outl(~val & 3, dev->iobase + APCI2032_INT_CTRL_REG);
+ /*
+ * Note: We don't reenable the triggered interrupt sources because they
+ * are level-sensitive, hardware error status interrupt sources and
+ * they'd keep triggering interrupts repeatedly.
+ */
if (comedi_buf_put(s->async, val))
s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS;