summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-08-09 01:25:39 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-08-09 01:25:39 +0000
commit145d616b497fa5b5207ce540d503e8a52a34babd (patch)
treeb535039b25d4931e811e56b9dedb0f99e36414ed
parent5d10e650814b4bae22e82bb0d7a595dcc101483b (diff)
small fix for robbed-bit-signaling mode
small code efficiency improvement git-svn-id: http://svn.digium.com/svn/zaptel/branches/v1-0@727 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-xwct4xxp.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/wct4xxp.c b/wct4xxp.c
index b6350ea..0927f23 100755
--- a/wct4xxp.c
+++ b/wct4xxp.c
@@ -1375,25 +1375,20 @@ static int t4_startup(struct zt_span *span)
} else { /* is a T1 card */
__t4_configure_t1(wc, span->offset, span->lineconfig, span->txlevel);
}
+
/* Note clear channel status */
+ wc->tspans[span->offset]->notclear = 0;
__set_clear(wc, span->offset);
if (!alreadyrunning) {
span->flags |= ZT_FLAG_RUNNING;
wc->spansstarted++;
- /* enable interrupts */
+ /* enable interrupts */
/* Start DMA, enabling DMA interrupts on read only */
- if (ts->spanflags & FLAG_2NDGEN)
-#ifdef VPM_SUPPORT
- wc->dmactrl = 0xc0000000 | (1 << 29) | wc->vpm;
-#else
- wc->dmactrl = 0xc0000000 | (1 << 29);
-#endif
- else
+ wc->dmactrl = 1 << 29;
+ wc->dmactrl |= (ts->spanflags & FLAG_2NDGEN) ? 0xc0000000 : 0xc0000003;
#ifdef VPM_SUPPORT
- wc->dmactrl = 0xc0000003 | (1 << 29) | wc->vpm;
-#else
- wc->dmactrl = 0xc0000003 | (1 << 29);
+ wc->dmactrl |= wc->vpm;
#endif
if (noburst)
wc->dmactrl |= (1 << 26);
@@ -1413,8 +1408,8 @@ static int t4_startup(struct zt_span *span)
}
#ifdef VPM_SUPPORT
if (!alreadyrunning && !wc->vpm) {
- wait_a_little();
- t4_vpm_init(wc);
+ wait_a_little();
+ t4_vpm_init(wc);
}
#endif
printk("Completed startup!\n");