make sure bogus interrupts during ai insn don't cause problems
authorFrank Mori Hess <fmhess@speakeasy.net>
Sat, 22 Jun 2002 20:06:41 +0000 (20:06 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Sat, 22 Jun 2002 20:06:41 +0000 (20:06 +0000)
comedi/drivers/cb_pcidas64.c

index 7666a0c2368f87a0c8eec73a8ad809dc79bea711..c2783a9c8315c8b212f06a869b42639f25823fcf 100644 (file)
@@ -1999,7 +1999,8 @@ static void handle_interrupt(int irq, void *d, struct pt_regs *regs)
        if( status & ADC_DONE_BIT )
        {
                DEBUG_PRINT("adc done interrupt\n");
-               pio_drain_ai_fifo(dev);
+               if( private(dev)->ai_cmd_running )
+                       pio_drain_ai_fifo(dev);
        }
 
        // if we are have all the data, then quit