[dahdi-commits] mspiceland: branch linux/mspiceland/dahdi-qfalc31 r7080 - /linux/team/mspicel...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Tue Aug 25 20:46:51 CDT 2009
Author: mspiceland
Date: Tue Aug 25 20:46:47 2009
New Revision: 7080
URL: http://svn.asterisk.org/svn-view/dahdi?view=rev&rev=7080
Log:
This change appears to resolve part if not all of the issues with unstable
alarm handling. This is a tweak to the method used for no longer manually
sending yellow allarsm. It looks like the FLAG_SENDINGYELLOW is
important :-) I still need to research why this affects things and fix
this in a more appropriate way.
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=7080&r1=7079&r2=7080
==============================================================================
--- linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/team/mspiceland/dahdi-qfalc31/drivers/dahdi/wct4xxp/base.c Tue Aug 25 20:46:47 2009
@@ -542,6 +542,8 @@
}
ret = __t4_pci_in(wc, WC_LDATA);
__t4_pci_out(wc, WC_LADDR, (unit << 8) | (addr & 0xff));
+ if (unlikely(debug & DEBUG_REGS))
+ printk(KERN_INFO "Reading unit %d address %02x is %02x\n", unit, addr, ret & 0xff);
return ret & 0xff;
}
@@ -2591,24 +2593,28 @@
alarms |= DAHDI_ALARM_RECOVER;
/* If receiving alarms, go into Yellow alarm state */
- if (!(wc->falc31) && alarms && !(ts->spanflags & FLAG_SENDINGYELLOW)) {
+ if (alarms && !(ts->spanflags & FLAG_SENDINGYELLOW)) {
unsigned char fmr4;
-#if 1
- printk(KERN_INFO "wct%dxxp: Setting yellow alarm on span %d\n", wc->numspans, span + 1);
-#endif
- /* We manually do yellow alarm to handle RECOVER and NOTOPEN, otherwise it's auto anyway */
- fmr4 = __t4_framer_in(wc, span, 0x20);
- __t4_framer_out(wc, span, 0x20, fmr4 | 0x20);
- ts->spanflags |= FLAG_SENDINGYELLOW;
- } else if (!(wc->falc31) && (!alarms) && (ts->spanflags & FLAG_SENDINGYELLOW)) {
+ if (wc->falc31) {
+ printk(KERN_INFO "wct%dxxp: Auto setting yellow alarm on span %d\n", wc->numspans, span + 1);
+ } else {
+ /* We manually do yellow alarm to handle RECOVER and NOTOPEN, otherwise it's auto anyway */
+ 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);
+ }
+ } else if ((!alarms) && (ts->spanflags & FLAG_SENDINGYELLOW)) {
unsigned char fmr4;
-#if 1
- printk(KERN_INFO "wct%dxxp: Clearing yellow alarm on span %d\n", wc->numspans, span + 1);
-#endif
- /* 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;
+ if (wc->falc31) {
+ printk(KERN_INFO "wct%dxxp: Auto clearing yellow alarm on span %d\n", wc->numspans, span + 1);
+ } else {
+ /* 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);
+ }
}
/* Re-check the timing source when we enter/leave alarm, not withstanding
@@ -2729,7 +2735,7 @@
isr4 = (gis & FRMR_GIS_ISR4) ? t4_framer_in(wc, span, FRMR_ISR4) : 0;
if (debug & DEBUG_FRAMER)
- printk(KERN_DEBUG "gis: %02x, isr0: %02x, isr1: %02x, isr2: %02x, isr3: %02x, isr4: %02x\n", gis, isr0, isr1, isr2, isr3, isr4);
+ printk(KERN_DEBUG "gis: %02x, isr0: %02x, isr1: %02x, isr2: %02x, isr3: %02x, isr4: %02x, intcount= %d\n", gis, isr0, isr1, isr2, isr3, isr4, wc->intcount);
if (isr0)
t4_check_sigbits(wc, span);
More information about the dahdi-commits
mailing list