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 10:12:58 +0000 (12:12 +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 a574885ffba9f5937b1514719f10428052537436..18c5312f7886f1067da57d37bcb1d4757a9bb5f1 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);
 }