Skip to content

Commit a3b2ee1

Browse files
bigguinessgregkh
authored andcommitted
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: H Hartley Sweeten <[email protected]> Reviewed-by: Ian Abbott <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 84bb0bc commit a3b2ee1

File tree

1 file changed

+1
-1
lines changed
  • drivers/staging/comedi/drivers

1 file changed

+1
-1
lines changed

drivers/staging/comedi/drivers/das16.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ static void das16_interrupt(struct comedi_device *dev)
523523
devpriv->adc_byte_count -= num_bytes;
524524

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

529529
nxt_desc->size = nxt_desc->maxsize;

0 commit comments

Comments
 (0)