staging: comedi: ni_mio_common: ack ai fifo error interrupts.
authorFrank Mori Hess <fmh6jj@gmail.com>
Thu, 15 Mar 2018 10:25:44 +0000 (10:25 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Apr 2018 12:26:32 +0000 (14:26 +0200)
commit e1d9fc04c41840a4688ef6ce90b6dcca157ea4d7 upstream.

Ack ai fifo error interrupts in interrupt handler to clear interrupt
after fifo overflow.  It should prevent lock-ups after the ai fifo
overflows.

Cc: <stable@vger.kernel.org> # v4.2+
Signed-off-by: Frank Mori Hess <fmh6jj@gmail.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_mio_common.c

index 398347fedc476b3f186cbc38f4eb76271874b216..2cac160993bbd82f12246951e7db109b5fc043ac 100644 (file)
@@ -1284,6 +1284,8 @@ static void ack_a_interrupt(struct comedi_device *dev, unsigned short a_status)
                ack |= NISTC_INTA_ACK_AI_START;
        if (a_status & NISTC_AI_STATUS1_STOP)
                ack |= NISTC_INTA_ACK_AI_STOP;
+       if (a_status & NISTC_AI_STATUS1_OVER)
+               ack |= NISTC_INTA_ACK_AI_ERR;
        if (ack)
                ni_stc_writew(dev, ack, NISTC_INTA_ACK_REG);
 }