[dahdi-commits] rmeyerriecks: branch linux/mspiceland/dahdi-qfalc31 r7917 - /linux/team/mspic...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Fri Jan 15 17:22:22 CST 2010


Author: rmeyerriecks
Date: Fri Jan 15 17:22:20 2010
New Revision: 7917

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7917
Log:
wct4xxp: Fixing errata with the qfalc3.1 chip. Sometimes, in T1 mode, when
the yellow alarm signal is being handled manually, the yellow alarm state
can be stuck. We cannot use automatic mode due to custom debouncing logic,
so we force manual mode and hit a bugfix register defined in the errata.


Modified:
    linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c

Modified: linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c?view=diff&rev=7917&r1=7916&r2=7917
==============================================================================
--- linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c Fri Jan 15 17:22:20 2010
@@ -1997,6 +1997,9 @@
 		if (debug)
 			printk(KERN_INFO "card %d span %d: setting Rtx to 0ohm for T1\n", wc->num, unit);
 		__t4_framer_out(wc, unit, 0x86, 0x00);	/* PC6: set Rtx to 0ohm for T1 */
+
+		// Hitting the bugfix register to fix errata #3
+		__t4_framer_out(wc, unit, 0xbd, 0x05);
 	}
 
 	__t4_framer_out(wc, unit, 0x3a, lim2);	/* LIM2: 50% peak amplitude is a "1" */
@@ -2679,26 +2682,21 @@
 
 	/* If receiving alarms, go into Yellow alarm state */
 	if (alarms && !(ts->spanflags & FLAG_SENDINGYELLOW)) {
-		if (wc->falc31) {
-			printk(KERN_INFO "wct%dxxp: Auto setting yellow alarm on card %d span %d\n", wc->numspans, wc->num, span + 1);
-		} else {
-			/* We manually do yellow alarm to handle RECOVER and NOTOPEN, otherwise it's auto anyway */
-			unsigned char fmr4;
-			fmr4 = __t4_framer_in(wc, span, 0x20);
-			__t4_framer_out(wc, span, 0x20, fmr4 | 0x20);
-			printk(KERN_INFO "wct%dxxp: Setting yellow alarm on card %d span %d\n", wc->numspans, wc->num, span + 1);
-		}
+		/* We manually do yellow alarm to handle RECOVER and NOTOPEN, otherwise it's auto anyway */
+		unsigned char fmr4;
+		fmr4 = __t4_framer_in(wc, span, 0x20);
+		__t4_framer_out(wc, span, 0x20, fmr4 | 0x20);
+		dev_info(&wc->dev->dev, "Setting yellow alarm span %d\n",
+								span+1);
 		ts->spanflags |= FLAG_SENDINGYELLOW;
 	} else if ((!alarms) && (ts->spanflags & FLAG_SENDINGYELLOW)) {
-		if (wc->falc31) {
-			printk(KERN_INFO "wct%dxxp: Auto clearing yellow alarm on card %d span %d\n", wc->numspans, wc->num, span + 1);
-		} else {
-			unsigned char fmr4;
-			/* We manually do yellow alarm to handle RECOVER  */
-			fmr4 = __t4_framer_in(wc, span, 0x20);
-			__t4_framer_out(wc, span, 0x20, fmr4 & ~0x20);
-			printk(KERN_INFO "wct%dxxp: Clearing yellow alarm on card %d span %d\n", wc->numspans, wc->num, span + 1);
-		}
+		unsigned char fmr4;
+		/* We manually do yellow alarm to handle RECOVER  */
+		fmr4 = __t4_framer_in(wc, span, 0x20);
+		__t4_framer_out(wc, span, 0x20, fmr4 & ~0x20);
+		dev_info(&wc->dev->dev, "Clearing yellow alarm span %d\n",
+								span+1);
+
 		/* Re-enable timing slip interrupts */
 		e = __t4_framer_in(wc, span, 0x17);
 




More information about the dahdi-commits mailing list