diff options
author | Russ Meyerriecks <rmeyerriecks@digium.com> | 2010-12-08 22:11:58 +0000 |
---|---|---|
committer | Russ Meyerriecks <rmeyerriecks@digium.com> | 2010-12-08 22:11:58 +0000 |
commit | a1f4f0b3352321f355bb096a41e788dcc9240e6d (patch) | |
tree | 84000d85f123003870a3b5652bfd9ecda0c6887b /drivers/dahdi/wcte12xp | |
parent | e78e5fa40c52d1d6dd49ace2936c23790cc6ae46 (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')
-rw-r--r-- | drivers/dahdi/wcte12xp/base.c | 7 | ||||
-rw-r--r-- | drivers/dahdi/wcte12xp/wcte12xp.h | 3 |
2 files changed, 10 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; diff --git a/drivers/dahdi/wcte12xp/wcte12xp.h b/drivers/dahdi/wcte12xp/wcte12xp.h index 079988f..fa1afa8 100644 --- a/drivers/dahdi/wcte12xp/wcte12xp.h +++ b/drivers/dahdi/wcte12xp/wcte12xp.h @@ -142,6 +142,9 @@ struct t1 { #define t1_info(t1, format, arg...) \ dev_info(&t1->vb.pdev->dev , format , ## arg) +#define t1_notice(t1, format, arg...) \ + dev_notice(&t1->vb.pdev->dev , format , ## arg) + /* Maintenance Mode Registers */ #define LIM0 0x36 #define LIM0_LL (1<<1) |