[svn-commits] mspiceland: branch linux/mspiceland/dahdi-qfalc31 r7081 - /linux/team/mspicel...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Aug 26 20:23:36 CDT 2009


Author: mspiceland
Date: Wed Aug 26 20:23:32 2009
New Revision: 7081

URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=7081
Log:
Fix blue alarm (yellow alarm detection) as it should check for 0x40 to be 
set not 0x4.

Previous commit intended to set the FLAG_SENDINGYELLOW but it did not.  Now
there are more questions as to why it worked.  With this change, not only
do the alarms not go haywire but we have matched paires of setting and
clearing yellow alarms (as we should).

Added card identifier (wc->num) to qfalc 2.1 identification message.

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

Modified: linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c
URL: http://svn.asterisk.org/svn-view/dahdi/linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c?view=diff&rev=7081&r1=7080&r2=7081
==============================================================================
--- linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c Wed Aug 26 20:23:32 2009
@@ -2579,7 +2579,7 @@
 			ts->alarmcount++;
 	} else
 		ts->alarmcount = 0;
-	if (c & 0x4)
+	if (c & 0x40)
 		alarms |= DAHDI_ALARM_BLUE;
 
 	if (((!ts->span.alarms) && alarms) || 
@@ -2594,27 +2594,27 @@
 
 	/* If receiving alarms, go into Yellow alarm state */
 	if (alarms && !(ts->spanflags & FLAG_SENDINGYELLOW)) {
-		unsigned char fmr4;
 		if (wc->falc31) {
-			printk(KERN_INFO "wct%dxxp: Auto setting yellow alarm on span %d\n", wc->numspans, span + 1);
+			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);
-			ts->spanflags |= FLAG_SENDINGYELLOW;
-			printk(KERN_INFO "wct%dxxp: Setting yellow alarm on span %d\n", wc->numspans, span + 1);
-		}
+			printk(KERN_INFO "wct%dxxp: Setting yellow alarm on card %d span %d\n", wc->numspans, wc->num, span + 1);
+		}
+		ts->spanflags |= FLAG_SENDINGYELLOW;
 	} else if ((!alarms) && (ts->spanflags & FLAG_SENDINGYELLOW)) {
-		unsigned char fmr4;
 		if (wc->falc31) {
-			printk(KERN_INFO "wct%dxxp: Auto clearing yellow alarm on span %d\n", wc->numspans, span + 1);
+			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);
-			ts->spanflags &= ~FLAG_SENDINGYELLOW;
-			printk(KERN_INFO "wct%dxxp: Clearing yellow alarm on span %d\n", wc->numspans, span + 1);
-		}
+			printk(KERN_INFO "wct%dxxp: Clearing yellow alarm on card %d span %d\n", wc->numspans, wc->num, span + 1);
+		}
+		ts->spanflags &= ~FLAG_SENDINGYELLOW;
 	}
 
 	/* Re-check the timing source when we enter/leave alarm, not withstanding
@@ -3542,7 +3542,7 @@
 	regval |= (1 << 5); /* set COMP_DIS*/
 	t4_framer_out(wc, 0, 0xd6, regval);
 	if (t4_framer_in(wc, 0, 0x4a) == 0x05)
-		printk(KERN_INFO "FALC framer is v2.1 or earlier.\n");
+		printk(KERN_INFO "card %d: FALC framer is v2.1 or earlier.\n", wc->num);
 	else if (t4_framer_in(wc, 0, 0x4a) == 0x20) {
 		printk(KERN_INFO "card %d: FALC framer is v3.1.\n", wc->num);
 		wc->falc31 = 1;




More information about the svn-commits mailing list