diff options
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) |