diff options
author | matteo <matteo@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-02-27 06:00:24 +0000 |
---|---|---|
committer | matteo <matteo@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2003-02-27 06:00:24 +0000 |
commit | 6707996d1ada38fb52d4ad3920b6549d38277ce5 (patch) | |
tree | d7a12009a60ae5d2bcd592b93363f95fb6db84b6 /tor2.c | |
parent | b574418782d181cbd69a271704d8d3f3a3d38fb6 (diff) |
Thu Feb 27 07:00:01 CET 2003
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@151 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'tor2.c')
-rwxr-xr-x | tor2.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -168,6 +168,7 @@ struct tor2 *cards[MAX_TOR_CARDS]; #define TOR_BBIT 4 static int debug; +static int japan; static int loopback; static int highestorder; static int timingcable; @@ -882,6 +883,9 @@ static int tor2_startup(struct zt_span *span) t1out(p->tor,tspan, 0x12, 0x22); t1out(p->tor,tspan, 0x14, 0x80); t1out(p->tor,tspan, 0x15, 0x80); + /* Setup japanese mode if appropriate */ + t1out(p->tor,tspan,0x19,(japan ? 0x80 : 0x00)); /* no local loop */ + t1out(p->tor,tspan,0x1e,(japan ? 0x80 : 0x00)); /* no local loop */ } /* Enable F bits pattern */ i = 0x20; @@ -972,15 +976,15 @@ static int tor2_maint(struct zt_span *span, int cmd) } switch(cmd) { case ZT_MAINT_NONE: - t1out(p->tor,tspan,0x19,0); /* no local loop */ + t1out(p->tor,tspan,0x19,(japan ? 0x80 : 0x00)); /* no local loop */ t1out(p->tor,tspan,0x0a,0); /* no remote loop */ break; case ZT_MAINT_LOCALLOOP: - t1out(p->tor,tspan,0x19,0x40); /* local loop */ + t1out(p->tor,tspan,0x19,0x40 | (japan ? 0x80 : 0x00)); /* local loop */ t1out(p->tor,tspan,0x0a,0); /* no remote loop */ break; case ZT_MAINT_REMOTELOOP: - t1out(p->tor,tspan,0x1e,0); /* no local loop */ + t1out(p->tor,tspan,0x1e,(japan ? 0x80 : 0x00)); /* no local loop */ t1out(p->tor,tspan,0x0a,0x40); /* remote loop */ break; case ZT_MAINT_LOOPUP: @@ -1259,7 +1263,7 @@ static void tor2_intr(int irq, void *dev_id, struct pt_regs *regs) if ((tor->loopupcnt[i]++ > 80) && (tor->spans[i].maintstat != ZT_MAINT_REMOTELOOP)) { - t1out(tor,i + 1,0x1e,0); /* no local loop */ + t1out(tor,i + 1,0x1e,(japan ? 0x80 : 0x00)); /* no local loop */ t1out(tor,i + 1,0x0a,0x40); /* remote loop */ tor->spans[i].maintstat = ZT_MAINT_REMOTELOOP; } @@ -1271,7 +1275,7 @@ static void tor2_intr(int irq, void *dev_id, struct pt_regs *regs) if ((tor->loopdowncnt[i]++ > 80) && (tor->spans[i].maintstat == ZT_MAINT_REMOTELOOP)) { - t1out(tor,i + 1,0x1e,0); /* no local loop */ + t1out(tor,i + 1,0x1e,(japan ? 0x80 : 0x00)); /* no local loop */ t1out(tor,i + 1,0x0a,0); /* no remote loop */ tor->spans[i].maintstat = ZT_MAINT_NONE; } @@ -1427,6 +1431,7 @@ MODULE_LICENSE("GPL"); MODULE_PARM(debug, "i"); MODULE_PARM(loopback, "i"); MODULE_PARM(timingcable, "i"); +MODULE_PARM(japan, "i"); MODULE_DEVICE_TABLE(pci, tor2_pci_ids); |