From: Frank Mori Hess Date: Fri, 5 Sep 2003 17:14:52 +0000 (+0000) Subject: ignore ai errors that occur after we have all the data we wanted X-Git-Tag: r0_7_69~231 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=01973117877200b9b27a490d763d216db560b3de;p=comedi.git ignore ai errors that occur after we have all the data we wanted --- diff --git a/comedi/drivers/dt282x.c b/comedi/drivers/dt282x.c index 746532e5..41086868 100644 --- a/comedi/drivers/dt282x.c +++ b/comedi/drivers/dt282x.c @@ -559,12 +559,6 @@ static irqreturn_t dt282x_interrupt(int irq, void *d, struct pt_regs *regs) int handled = 0; adcsr=inw(dev->iobase + DT2821_ADCSR); - if (adcsr & DT2821_ADERR) { - comedi_error(dev, "A/D error"); - dt282x_ai_cancel(dev,s); - s->async->events |= COMEDI_CB_ERROR; - handled = 1; - } supcsr = inw(dev->iobase + DT2821_SUPCSR); /*printk("supcsr=%02x\n",supcsr);*/ if (supcsr & DT2821_DMAD) { @@ -574,6 +568,15 @@ static irqreturn_t dt282x_interrupt(int irq, void *d, struct pt_regs *regs) dt282x_ao_dma_interrupt(dev); handled = 1; } + if (adcsr & DT2821_ADERR) { + if(devpriv->nread != 0 ) + { + comedi_error(dev, "A/D error"); + dt282x_ai_cancel(dev,s); + s->async->events |= COMEDI_CB_ERROR; + } + handled = 1; + } if ((dacsr = inw(dev->iobase + DT2821_DACSR)) & DT2821_DAERR) { #if 0 static int warn = 5;