[dahdi-commits] dahdi/linux.git branch "2.6.y" updated.

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Tue May 14 15:29:57 CDT 2013


branch "2.6.y" has been updated
       via  7dc4bb92a7f9104abf17fdee7f726a8bb214762a (commit)
       via  34929919f0fcb8325adb2b9a631e52a6c78948fd (commit)
      from  9df16aa445d70c05a120ef2329a620e31b27e794 (commit)

Summary of changes:
 drivers/dahdi/dahdi-base.c    |    2 +-
 drivers/dahdi/wcte12xp/base.c |   13 +++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit 7dc4bb92a7f9104abf17fdee7f726a8bb214762a
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Fri May 10 14:24:11 2013 -0500

    dahdi: Prevent potential error when only switching spantype of single span.
    
    If you have a multiple span system configured for t1 mode, and you try to change
    only the first span from t1 to e1 via sysfs, you could get an error in the
    kernel log about trying to create duplicate channel.
    
    The problem is that the check for whether there was enough room for the all the
    channels of the switched span was wrong.
    
    Reported-by: James Brown <jbrown at digium.com>
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>
    (cherry picked from commit a3ad32c370dac9fb8d196db7f4d53e2a3f59d1ba)

diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 0863c0b..b7c25f0 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -6708,7 +6708,7 @@ static int _assign_spanno_and_basechan(struct dahdi_span *span)
 		}
 
 		next_channo = _get_next_channo(pos);
-		if ((basechan + span->channels) >= next_channo)
+		if ((basechan + span->channels) <= next_channo)
 			break;
 
 		/* We can't fit here, let's look at the next location. */

commit 34929919f0fcb8325adb2b9a631e52a6c78948fd
Author: Shaun Ruffell <sruffell at digium.com>
Date:   Thu May 9 15:10:11 2013 -0500

    wcte12xp: Look for multiple loopup codes before setting looping up the framer.
    
    This brings the wcte12xp driver in line with the wct4xxp driver. It also
    eliminates the chance that the local side will errouneously go into loopup when
    switched from E1 to T1 mode via the spantype sysfs attribute.
    
    Internal-Issue-ID: DAHDI-1038
    Signed-off-by: Shaun Ruffell <sruffell at digium.com>
    Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>
    (cherry picked from commit 9a7db0943b5402a92069ac8857fd1a3b1a0d6979)

diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index 6a34095..868c272 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -2202,27 +2202,32 @@ static void t1_check_alarms(struct t1 *wc)
 		/* Detect loopup code if we're not sending one */
 		if ((!wc->span.mainttimer) && (d & 0x08)) {
 			/* Loop-up code detected */
-			if ((wc->span.maintstat != DAHDI_MAINT_REMOTELOOP)) {
+			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;
 			}
-		} else
+		} else {
 			wc->loopupcnt = 0;
+		}
+
 		/* Same for loopdown code */
 		if ((!wc->span.mainttimer) && (d & 0x10)) {
 			/* Loop-down code detected */
-			if ((wc->span.maintstat == DAHDI_MAINT_REMOTELOOP)) {
+			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;
 			}
-		} else
+		} else {
 			wc->loopdowncnt = 0;
+		}
 	}
 
 	if (wc->span.lineconfig & DAHDI_CONFIG_NOTOPEN) {

-----------------------------------------------------------------------


-- 
dahdi/linux.git



More information about the dahdi-commits mailing list