Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3b2ee1d authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: das16: use COMEDI_CB_CANCEL_MASK to see if command is running



In das16_interrupt(), use COMEDI_CB_CANCEL_MASK to determine if the async
command is still running and the dma needs to be re-enabled. This will
cause the driver not re-enable the dma if the async buffer overflows
(COMEDI_CB_OVERFLOW), a hardware error occurs (COMEDI_CB_ERROR), or the
command completes (COMEDI_CB_EOA).

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 84bb0bcc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -523,7 +523,7 @@ static void das16_interrupt(struct comedi_device *dev)
	devpriv->adc_byte_count -= num_bytes;

	/* re-enable dma */
	if ((async->events & COMEDI_CB_EOA) == 0) {
	if (!(async->events & COMEDI_CB_CANCEL_MASK)) {
		struct comedi_isadma_desc *nxt_desc = &dma->desc[dma->cur_dma];

		nxt_desc->size = nxt_desc->maxsize;