From df10a24eec7570fa1633511eadeeecd932ee5689 Mon Sep 17 00:00:00 2001 From: martinp Date: Thu, 14 Aug 2003 20:35:10 +0000 Subject: Fix the detecting of the double missed IRQ for more than one board git-svn-id: http://svn.digium.com/svn/zaptel/trunk@229 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- wct4xxp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wct4xxp.c b/wct4xxp.c index a6d7d1b..d3bbad6 100755 --- a/wct4xxp.c +++ b/wct4xxp.c @@ -127,6 +127,7 @@ struct t4 { int spantype[4]; /* card type, T1 or E1 */ unsigned int passno; /* number of interrupt passes */ char *variety; + int last0; /* for detecting double-missed IRQ */ }; static void set_clear(struct t4 *wc, int span); @@ -878,21 +879,20 @@ found: static void t4_receiveprep(struct t4 *wc, int irq) { volatile unsigned int *readchunk; - static int last0 = 1; int dbl = 0; int x,y,z; unsigned int tmp; if (irq & 1) { /* First part */ readchunk = wc->readchunk + 1; - if (!last0) + if (!wc->last0) dbl = 1; - last0 = 0; + wc->last0 = 0; } else { readchunk = wc->readchunk + ZT_CHUNKSIZE * 32 + 1; - if (last0) + if (wc->last0) dbl = 1; - last0 = 1; + wc->last0 = 1; } if (dbl) printk("TE410P: Double/missed interrupt detected\n"); -- cgit v1.2.3