From 34d15e679fa190aa11ad038db032f42f0918c9fc Mon Sep 17 00:00:00 2001 From: markster Date: Tue, 23 Sep 2003 16:04:45 +0000 Subject: Apply tcr2 fix to tor2, too git-svn-id: http://svn.digium.com/svn/zaptel/trunk@245 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- tor2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tor2.c b/tor2.c index 84a7f4d..8392354 100755 --- a/tor2.c +++ b/tor2.c @@ -792,7 +792,7 @@ static int tor2_startup(struct zt_span *span) p->tor->syncsrc = -1; if (p->tor->cardtype == TYPE_E1) { /* if this is an E1 card */ - unsigned char tcr1,ccr1; + unsigned char tcr1,ccr1,tcr2; if (!alreadyrunning) { p->tor->mem8[SYNCREG] = SYNCSELF; p->tor->mem8[CTLREG] = E1DIV; @@ -821,6 +821,7 @@ static int tor2_startup(struct zt_span *span) ccr1 = 0; crcing = ""; tcr1 = 9; /* base TCR1 value: TSis mode */ + tcr2 = 0; if (span->lineconfig & ZT_CONFIG_CCS) { ccr1 |= 8; /* CCR1: Rx Sig mode: CCS */ coding = "CCS"; @@ -834,9 +835,11 @@ static int tor2_startup(struct zt_span *span) } else framing = "AMI"; if (span->lineconfig & ZT_CONFIG_CRC4) { ccr1 |= 0x11; /* CCR1: TX and TX CRC4 */ + tcr2 |= 0x02; /* TCR2: CRC4 bit auto */ crcing = "/CRC4"; } t1out(p->tor,tspan,0x12,tcr1); + t1out(p->tor,tspan,0x13,tcr2); t1out(p->tor,tspan,0x14,ccr1); t1out(p->tor,tspan, 0x18, 0x20); /* 120 Ohm, normal */ -- cgit v1.2.3