[PATCH 4/6] staging: comedi: das16: use COMEDI_CB_CANCEL_MASK to see if command is running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/das16.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c
index 466d4ef..4608b01 100644
--- a/drivers/staging/comedi/drivers/das16.c
+++ b/drivers/staging/comedi/drivers/das16.c
@@ -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;
-- 
2.0.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux