summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartinp <martinp@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-08-14 20:35:10 +0000
committermartinp <martinp@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-08-14 20:35:10 +0000
commitdf10a24eec7570fa1633511eadeeecd932ee5689 (patch)
tree6a3061541ceb735b1a67a2b4d5ca6c2d3f59a820
parent05f825213ce8efa0de97874ebbecf8fae9a6f7b4 (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-xwct4xxp.c10
1 files 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");