summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcte12xp/base.c
diff options
context:
space:
mode:
authorRuss Meyerriecks <rmeyerreicks@digium.com>2010-12-08 22:11:58 +0000
committerRuss Meyerriecks <rmeyerreicks@digium.com>2010-12-08 22:11:58 +0000
commit4d3fdb9c0c622ef769a4f3e1206fbe041f961008 (patch)
tree84000d85f123003870a3b5652bfd9ecda0c6887b /drivers/dahdi/wcte12xp/base.c
parenta745081ca1e96d4031e7bbcea6b9961d71523cc2 (diff)
dahdi: Fixed loopup/loopdown signals
The loopup/loopdown T1 maintenance feature in the single through quad-span drivers now function properly, according to AT&T TR54016, by sending a full rate pattern down the line. T1.403 ESF/Data Link patterns are not supported currently. Also grouped all the maint reset register clears under a single irq lock to crank the performance up past 11. Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com> Acked-by: Shaun Ruffell <sruffell@digium.com> Acked-by: Kinsey Moore <kmoore@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9516 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wcte12xp/base.c')
-rw-r--r--drivers/dahdi/wcte12xp/base.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index a97cd32..426e2da 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -1281,6 +1281,9 @@ static int t1xxp_clear_maint(struct dahdi_span *span)
if (reg < 0)
return -EIO;
t1_setreg(wc, LIM1, reg & ~(LIM1_RL | LIM1_JATT));
+
+ /* Clear loopup/loopdown signals on the line */
+ t1_setreg(wc, 0x21, 0x40);
return 0;
}
@@ -1699,6 +1702,8 @@ static inline void t1_check_alarms(struct t1 *wc)
if ((!wc->span.mainttimer) && (d & 0x08)) {
/* Loop-up code detected */
if ((wc->loopupcnt++ > 80) && (wc->span.maintstat != DAHDI_MAINT_REMOTELOOP)) {
+ t1_notice(wc, "Loopup detected,"\
+ " enabling remote loop\n");
t1_setreg(wc, 0x36, 0x08); /* LIM0: Disable any local loop */
t1_setreg(wc, 0x37, 0xf6); /* LIM1: Enable remote loop */
wc->span.maintstat = DAHDI_MAINT_REMOTELOOP;
@@ -1709,6 +1714,8 @@ static inline void t1_check_alarms(struct t1 *wc)
if ((!wc->span.mainttimer) && (d & 0x10)) {
/* Loop-down code detected */
if ((wc->loopdowncnt++ > 80) && (wc->span.maintstat == DAHDI_MAINT_REMOTELOOP)) {
+ t1_notice(wc, "Loopdown detected,"\
+ " disabling remote loop\n");
t1_setreg(wc, 0x36, 0x08); /* LIM0: Disable any local loop */
t1_setreg(wc, 0x37, 0xf0); /* LIM1: Disable remote loop */
wc->span.maintstat = DAHDI_MAINT_NONE;