[dahdi-commits] mattf: linux/trunk r9127 - /linux/trunk/drivers/dahdi/wcb4xxp/base.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Aug 12 14:38:33 CDT 2010


Author: mattf
Date: Thu Aug 12 14:38:29 2010
New Revision: 9127

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9127
Log:
Timing fix where handling math in find_sync_src() would return -2 instead of -1 in cases where automatic timing sync was specified.

Modified:
    linux/trunk/drivers/dahdi/wcb4xxp/base.c

Modified: linux/trunk/drivers/dahdi/wcb4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcb4xxp/base.c?view=diff&rev=9127&r1=9126&r2=9127
==============================================================================
--- linux/trunk/drivers/dahdi/wcb4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcb4xxp/base.c Thu Aug 12 14:38:29 2010
@@ -1124,6 +1124,10 @@
 {
 	int b;
 
+#if 0
+	printk("Setting sync to be port %d\n", (port >= 0) ? port + 1 : port);
+#endif
+
 	if (port == -1) 		/* automatic */
 		b = 0;
 	else
@@ -1151,7 +1155,10 @@
 		}
 	}
 
-	return src - 1;
+	if (src >= 0)
+		return src - 1;
+	else
+		return src;
 }
 
 /*
@@ -1284,8 +1291,7 @@
 				dahdi_alarm_notify(&s->span);
 				if (DBG_ALARM)
 					dev_info(b4->dev, "span %d: alarm %d debounced\n", i + 1, s->newalarm);
-				if (!s->te_mode)
-					b4xxp_set_sync_src(b4, b4xxp_find_sync(b4));
+				b4xxp_set_sync_src(b4, b4xxp_find_sync(b4));
 			}
 		}
 	}
@@ -2192,11 +2198,12 @@
 		dev_info(b4->dev, "Configuring span %d\n", span->spanno);
 
 #if 0
-	if (lc->sync > 0 && bspan->te_mode) {
+	if (lc->sync > 0 && !bspan->te_mode) {
 		dev_info(b4->dev, "Span %d is not in NT mode, removing from sync source list\n", span->spanno);
 		lc->sync = 0;
 	}
 #endif
+
 	if (lc->sync < 0 || lc->sync > 4) {
 		dev_info(b4->dev, "Span %d has invalid sync priority (%d), removing from sync source list\n", span->spanno, lc->sync);
 		lc->sync = 0;




More information about the dahdi-commits mailing list