summaryrefslogtreecommitdiff
path: root/tor2.c
diff options
context:
space:
mode:
authormarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-09-23 16:04:45 +0000
committermarkster <markster@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2003-09-23 16:04:45 +0000
commit34d15e679fa190aa11ad038db032f42f0918c9fc (patch)
tree9770c22ac08a310092b5fbfd4996552e9af07cf4 /tor2.c
parentdb35fe703b3262cbdec1d1eff9b20a65c888d441 (diff)
Apply tcr2 fix to tor2, too
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@245 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'tor2.c')
-rwxr-xr-xtor2.c5
1 files changed, 4 insertions, 1 deletions
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 */