diff options
author | martinp <martinp@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-08-14 20:35:10 +0000 |
---|---|---|
committer | martinp <martinp@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-08-14 20:35:10 +0000 |
commit | df10a24eec7570fa1633511eadeeecd932ee5689 (patch) | |
tree | 6a3061541ceb735b1a67a2b4d5ca6c2d3f59a820 | |
parent | 05f825213ce8efa0de97874ebbecf8fae9a6f7b4 (diff) |
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
-rwxr-xr-x | wct4xxp.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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"); |