[svn-commits] rmeyerriecks: branch linux/rmeyerriecks/dahdi-linux-maintmodes r8047 - /linux...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Feb 18 17:27:36 CST 2010


Author: rmeyerriecks
Date: Thu Feb 18 17:27:32 2010
New Revision: 8047

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8047
Log:
Added local loopback support for our te12xp single span cards.

Modified:
    linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/base.c
    linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/wcte12xp.h

Modified: linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/base.c?view=diff&rev=8047&r1=8046&r2=8047
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/base.c Thu Feb 18 17:27:32 2010
@@ -1069,6 +1069,7 @@
 static int t1xxp_maint(struct dahdi_span *span, int cmd)
 {
 	struct t1 *wc = span->pvt;
+	int reg = 0;
 
 	if (wc->spantype == TYPE_E1) {
 		switch (cmd) {
@@ -1097,10 +1098,16 @@
 	} else {
 		switch (cmd) {
 		case DAHDI_MAINT_NONE:
-			module_printk("XXX Turn off local and remote loops T1 XXX\n");
+			module_printk("XXX Turn off all looping T1 XXX\n");
+
+			// Turn off local loop
+			reg = t1_getreg(wc, 0x36);
+			t1_setreg(wc, LIM0, reg & ~LIM0_LL);
 			break;
 		case DAHDI_MAINT_LOCALLOOP:
-			module_printk("XXX Turn on local loop and no remote loop XXX\n");
+			module_printk("XXX Turn on local loop XXX\n");
+			reg = t1_getreg(wc, 0x36);
+			t1_setreg(wc, LIM0, reg | LIM0_LL);
 			break;
 		case DAHDI_MAINT_REMOTELOOP:
 			module_printk("XXX Turn on remote loopup XXX\n");

Modified: linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/wcte12xp.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/wcte12xp.h?view=diff&rev=8047&r1=8046&r2=8047
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/wcte12xp.h (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wcte12xp/wcte12xp.h Thu Feb 18 17:27:32 2010
@@ -136,4 +136,8 @@
 	struct work_struct timer_work;
 };
 
+// Maintenance Mode
+#define LIM0	0x36
+#define LIM0_LL	(1<<1)	
+
 #endif




More information about the svn-commits mailing list