From 6b294b56837ac5b3f9c0a503dc23e78b99c5da95 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Sun, 10 Mar 2002 20:34:27 +0000 Subject: [PATCH] Add check for uncleared interrupts, enabled only when debugging. --- comedi/drivers/ni_mio_common.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index a10392f2..5697df27 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -328,6 +328,15 @@ static void ni_E_interrupt(int irq,void *d,struct pt_regs * regs) if(a_status&Interrupt_A_St)handle_a_interrupt(dev,a_status); if(b_status&Interrupt_B_St)handle_b_interrupt(dev,b_status); +#ifdef DEBUG_INTERRUPT + a_status=win_in(AI_Status_1_Register); + b_status=win_in(AO_Status_1_Register); + if(a_status&Interrupt_A_St || b_status&Interrupt_B_St){ + printk("ni_mio_common: BUG, didn't clear interrupt. disabling.\n"); + win_out(0,Interrupt_Control_Register); + } +#endif + win_restore(wsave); } -- 2.26.2