From 6037a1b54a77b96e152a21ad6099818edc52510a Mon Sep 17 00:00:00 2001 From: David Schleef Date: Wed, 20 Mar 2002 20:29:02 +0000 Subject: [PATCH] Change position of ai_reset when handling an error. --- comedi/drivers/ni_mio_common.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index 646b7b68..fe53315c 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -478,7 +478,7 @@ static void handle_a_interrupt(comedi_device *dev,unsigned short status, /* we probably aren't even running a command now, * so it's a good idea to be careful. */ if(s->subdev_flags&SDF_RUNNING){ - s->async->events |= COMEDI_CB_EOA; + s->async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; //comedi_event(dev,s,s->async->events); } return; @@ -488,6 +488,8 @@ static void handle_a_interrupt(comedi_device *dev,unsigned short status, status); ni_mio_print_status_a(status); + ni_ai_reset(dev,dev->subdevices); + win_out(AI_Error_Interrupt_Ack, Interrupt_A_Ack_Register); #ifdef PCIDMA @@ -504,9 +506,8 @@ static void handle_a_interrupt(comedi_device *dev,unsigned short status, AI_STOP_Interrupt_Enable| AI_Error_Interrupt_Enable| AI_FIFO_Interrupt_Enable,0); - ni_ai_reset(dev,dev->subdevices);//added by tim - s->async->events |= COMEDI_CB_EOA; - //comedi_event(dev,s,s->async->events); + s->async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA; + return; } if(status&AI_SC_TC_St){ -- 2.26.2