From: David Schleef Date: Sun, 10 Mar 2002 20:34:27 +0000 (+0000) Subject: Add check for uncleared interrupts, enabled only when debugging. X-Git-Tag: r0_7_64~56 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6b294b56837ac5b3f9c0a503dc23e78b99c5da95;p=comedi.git Add check for uncleared interrupts, enabled only when debugging. --- 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); }