diff options
author | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-05-02 18:16:12 +0000 |
---|---|---|
committer | mattf <mattf@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-05-02 18:16:12 +0000 |
commit | f698d587cf89dc0f6b07a10c9f7693a451624334 (patch) | |
tree | a468ba12727ce4e5c8b2a411409b97e38b3e1a4c | |
parent | c0c25efed7eb51f54399a330f7f59c177503f77b (diff) |
Move the checktiming parameter to a flag in checkflag as well
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4227 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | kernel/wct4xxp/base.c | 19 | ||||
-rw-r--r-- | kernel/wct4xxp/wct4xxp.h | 1 |
2 files changed, 11 insertions, 9 deletions
diff --git a/kernel/wct4xxp/base.c b/kernel/wct4xxp/base.c index b44747b..ec956c4 100644 --- a/kernel/wct4xxp/base.c +++ b/kernel/wct4xxp/base.c @@ -319,7 +319,6 @@ struct t4 { unsigned int passno; /* number of interrupt passes */ char *variety; int last0; /* for detecting double-missed IRQ */ - int checktiming; /* Set >0 to cause the timing source to be checked */ /* DMA related fields */ unsigned int dmactrl; @@ -1429,7 +1428,9 @@ static int t4_shutdown(struct zt_span *span) /* No longer in use, disable interrupts */ printk("TE%dXXP: Disabling interrupts since there are no active spans\n", wc->numspans); set_bit(T4_STOP_DMA, &wc->checkflag); - } else wc->checktiming = 1; + } else + set_bit(T4_CHECK_TIMING, &wc->checkflag); + spin_unlock_irqrestore(&wc->reglock, flags); /* Wait for interrupt routine to shut itself down */ @@ -1470,7 +1471,7 @@ static int t4_spanconfig(struct zt_span *span, struct zt_lineconfig *lc) wc->tspans[lc->sync - 1]->sync = span->spanno; wc->tspans[lc->sync - 1]->psync = span->offset + 1; } - wc->checktiming = 1; + set_bit(T4_CHECK_TIMING, &wc->checkflag); /* Make sure this is clear in case of multiple startup and shutdown * iterations */ @@ -1833,7 +1834,7 @@ found: } } } else - cards[0]->checktiming = 1; + set_bit(T4_CHECK_TIMING, &cards[0]->checkflag); #endif spin_unlock_irqrestore(&synclock, flags); return 0; @@ -1843,7 +1844,7 @@ static void __t4_set_timing_source_auto(struct t4 *wc) { int x; printk("timing source auto card %d!\n", wc->num); - wc->checktiming = 0; + clear_bit(T4_CHECK_TIMING, &wc->checkflag); if (timingcable) { __t4_findsync(wc); } else { @@ -2523,7 +2524,7 @@ static void t4_check_alarms(struct t4 *wc, int span) if (((!ts->span.alarms) && alarms) || (ts->span.alarms && (!alarms))) - wc->checktiming = 1; + set_bit(T4_CHECK_TIMING, &wc->checkflag); /* Keep track of recovering */ if ((!alarms) && ts->span.alarms) @@ -2887,7 +2888,7 @@ ZAP_IRQ_HANDLER(t4_interrupt) __handle_leds(wc); - if (wc->checktiming > 0) + if (test_bit(T4_CHECK_TIMING, &wc->checkflag)) __t4_set_timing_source_auto(wc); spin_unlock_irqrestore(&wc->reglock, flags); @@ -3027,7 +3028,7 @@ ZAP_IRQ_HANDLER(t4_interrupt_gen2) spin_lock(&wc->reglock); - if (unlikely(wc->checktiming > 0)) { + if (unlikely(test_bit(T4_CHECK_TIMING, &wc->checkflag))) { __t4_set_timing_source_auto(wc); } @@ -3532,7 +3533,7 @@ static int __devinit t4_launch(struct t4 *wc) return -1; } } - wc->checktiming = 1; + set_bit(T4_CHECK_TIMING, &wc->checkflag); spin_lock_irqsave(&wc->reglock, flags); __t4_set_timing_source(wc,4, 0, 0); spin_unlock_irqrestore(&wc->reglock, flags); diff --git a/kernel/wct4xxp/wct4xxp.h b/kernel/wct4xxp/wct4xxp.h index df63675..7d14b85 100644 --- a/kernel/wct4xxp/wct4xxp.h +++ b/kernel/wct4xxp/wct4xxp.h @@ -108,6 +108,7 @@ struct t4_regs { #define T4_CHECK_VPM 0 #define T4_LOADING_FW 1 #define T4_STOP_DMA 2 +#define T4_CHECK_TIMING 3 #define WCT4_GET_REGS _IOW (ZT_CODE, 60, struct t4_regs) |