[dahdi-commits] mspiceland: branch linux/rmeyerriecks/dahdi-linux-maintmodes r7450 - in /linu...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Fri Oct 30 13:23:48 CDT 2009


Author: mspiceland
Date: Fri Oct 30 13:23:43 2009
New Revision: 7450

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7450
Log:
Expand DAHDI_MAINT to allow ioctls for the 3 main loopback modes.  Changing
the name of DAHDI_MAINT_REMOTELOOP to DAHDI_MAINT_NETWORKLINELOOPBACK for
clarity.  Leaving the old definition for backwords compatibility.

Modified:
    linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c
    linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c
    linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h

Modified: linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c?view=diff&rev=7450&r1=7449&r2=7450
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/dahdi-base.c Fri Oct 30 13:23:43 2009
@@ -4403,7 +4403,8 @@
 		switch(maint.command) {
 		case DAHDI_MAINT_NONE:
 		case DAHDI_MAINT_LOCALLOOP:
-		case DAHDI_MAINT_REMOTELOOP:
+		case DAHDI_MAINT_NETWORKLINELOOP:
+		case DAHDI_MAINT_NETWORKPAYLOADLOOP:
 			/* if same, ignore it */
 			if (i == maint.command)
 				break;

Modified: linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c?view=diff&rev=7450&r1=7449&r2=7450
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/drivers/dahdi/wct4xxp/base.c Fri Oct 30 13:23:43 2009
@@ -430,6 +430,9 @@
 #define IERR_T 0x1B		/* Single Bit Defect Insertion Register */
 enum{IBV, IPE, ICASE, ICRCE, IMFE, IFASE};
 #define ISR3_SEC (1 << 6)	/* Internal one-second interrupt bit mask */
+
+#define FMR2_T 0x1E		/* Framer Mode Register 2 */
+#define FMR2_PLB (1 << 2)	/* Framer Mode Register 2 */
 
 #define FECL_T 0x50		/* Framing Error Counter Lower Byte */
 #define FECH_T 0x51		/* Framing Error Counter Higher Byte */
@@ -1404,14 +1407,19 @@
 			span->mainttimer = 0;
 			break;
 		case DAHDI_MAINT_LOCALLOOP:
-			printk(KERN_NOTICE "XXX Turn on local loop and no remote loop XXX\n");
+			printk(KERN_NOTICE "XXX Turn on Host Loopback and no remote loop XXX\n");
 			reg = t4_framer_in(wc, span->offset, LIM0_T);
 			t4_framer_out(wc, span->offset, LIM0_T, (reg | LIM0_LL));
 			break;
-		case DAHDI_MAINT_REMOTELOOP:
-			printk(KERN_NOTICE "XXX Turn on remote loopup XXX\n");
+		case DAHDI_MAINT_NETWORKLINELOOP:
+			printk(KERN_NOTICE "XXX Turn on Network Line Loopup XXX\n");
 			reg = t4_framer_in(wc, span->offset, LIM1_T);
 			t4_framer_out(wc, span->offset, LIM1_T, (reg | LIM1_RL));
+			break;
+		case DAHDI_MAINT_NETWORKPAYLOADLOOP:
+			printk(KERN_NOTICE "XXX Turn on Network Payload Loopup XXX\n");
+			reg = t4_framer_in(wc, span->offset, FMR2_T);
+			t4_framer_out(wc, span->offset, FMR2_T, (reg | FMR2_PLB));
 			break;
 		case DAHDI_MAINT_LOOPUP:
 			t4_framer_out(wc, span->offset, 0x21, 0x50);	/* FMR5: Nothing but RBS mode */

Modified: linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h?view=diff&rev=7450&r1=7449&r2=7450
==============================================================================
--- linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h (original)
+++ linux/team/rmeyerriecks/dahdi-linux-maintmodes/include/dahdi/user.h Fri Oct 30 13:23:43 2009
@@ -320,19 +320,21 @@
 #define DAHDI_ALARM_NOTOPEN		32
 
 /* Maintenance modes */
-#define DAHDI_MAINT_NONE		0	/* Normal Mode */
-#define DAHDI_MAINT_LOCALLOOP		1	/* Local Loopback */
-#define DAHDI_MAINT_REMOTELOOP		2	/* Remote Loopback */
-#define DAHDI_MAINT_LOOPUP		3	/* send loopup code */
-#define DAHDI_MAINT_LOOPDOWN		4	/* send loopdown code */
-#define DAHDI_MAINT_LOOPSTOP		5	/* stop sending loop codes */
-#define DAHDI_MAINT_FAS_DEFECT		6	/* insert a FAS defect */
-#define DAHDI_MAINT_MULTI_DEFECT	7	/* insert a Multiframe defect */
-#define DAHDI_MAINT_CRC_DEFECT		8	/* insert a FAS defect */
-#define DAHDI_MAINT_CAS_DEFECT		9	/* insert a FAS defect */
-#define DAHDI_MAINT_PRBS_DEFECT		10	/* insert a FAS defect */
-#define DAHDI_MAINT_BIPOLAR_DEFECT	11	/* insert a FAS defect */
-#define DAHDI_MAINT_PRBS		12	/* enable the PRBS gen/mon */
+#define DAHDI_MAINT_NONE			0	/* Normal Mode */
+#define DAHDI_MAINT_LOCALLOOP			1	/* Local Loopback */
+#define DAHDI_MAINT_REMOTELOOP			2	/* Remote Loopback */
+#define DAHDI_MAINT_NETWORKLINELOOP		2	/* Remote Loopback */
+#define DAHDI_MAINT_NETWORKPAYLOADLOOP		13	/* Remote Loopback */
+#define DAHDI_MAINT_LOOPUP			3	/* send loopup code */
+#define DAHDI_MAINT_LOOPDOWN			4	/* send loopdown code */
+#define DAHDI_MAINT_LOOPSTOP			5	/* stop sending loop codes */
+#define DAHDI_MAINT_FAS_DEFECT			6	/* insert a FAS defect */
+#define DAHDI_MAINT_MULTI_DEFECT		7	/* insert a Multiframe defect */
+#define DAHDI_MAINT_CRC_DEFECT			8	/* insert a FAS defect */
+#define DAHDI_MAINT_CAS_DEFECT			9	/* insert a FAS defect */
+#define DAHDI_MAINT_PRBS_DEFECT			10	/* insert a FAS defect */
+#define DAHDI_MAINT_BIPOLAR_DEFECT		11	/* insert a FAS defect */
+#define DAHDI_MAINT_PRBS			12	/* enable the PRBS gen/mon */
 
 /* Flag Value for IOMUX, read avail */
 #define DAHDI_IOMUX_READ	1




More information about the dahdi-commits mailing list