[svn-commits] sruffell: branch linux/sruffell/wctdm24xxp-updates r10127 - /linux/team/sruff...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Aug 12 19:36:11 CDT 2011


Author: sruffell
Date: Fri Aug 12 19:36:07 2011
New Revision: 10127

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10127
Log:
wctdm24xxp: Change intcount to framecount.

The variable does not necessarily have anything to do with the frequency
of interrupts but is instead a count of sframes received. For example,
it's possible to slow the interrupt rate down on the voicebus cards to
one every 2 frames.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c
    linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h

Modified: linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=10127&r1=10126&r2=10127
==============================================================================
--- linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/base.c Fri Aug 12 19:36:07 2011
@@ -698,7 +698,7 @@
 	struct vpmadt032_cmd *curcmd = NULL;
 	struct vpmadt032 *vpmadt032 = wc->vpmadt032;
 	int x;
-	unsigned char leds = ~((wc->intcount / 1000) % 8) & 0x7;
+	unsigned char leds = ~((wc->framecount / 1000) % 8) & 0x7;
 
 	/* Skip audio */
 	eframe += 24;
@@ -1663,16 +1663,16 @@
 		if (debug & DEBUG_CARD) {
 			dev_info(&wc->vb.pdev->dev,
 				 "SLIC_LF OK: card=%d shadow=%02x "
-				 "lasttxhook=%02x intcount=%d\n", mod->card,
-				 res, fxs->lasttxhook, wc->intcount);
+				 "lasttxhook=%02x framecount=%ld\n", mod->card,
+				 res, fxs->lasttxhook, wc->framecount);
 		}
 	} else if (fxs->oppending_ms && (--fxs->oppending_ms == 0)) {
 		wctdm_setreg_intr(wc, mod, LINE_STATE, fxs->lasttxhook);
 		if (debug & DEBUG_CARD) {
 			dev_info(&wc->vb.pdev->dev,
 				 "SLIC_LF RETRY: card=%d shadow=%02x "
-				 "lasttxhook=%02x intcount=%d\n", mod->card,
-				 res, fxs->lasttxhook, wc->intcount);
+				 "lasttxhook=%02x framecount=%ld\n", mod->card,
+				 res, fxs->lasttxhook, wc->framecount);
 		}
 	} else { /* Start 100ms Timeout */
 		fxs->oppending_ms = 100;
@@ -1712,18 +1712,18 @@
 		if ((res & SLIC_LF_SETMASK) == (fxs->lasttxhook & SLIC_LF_SETMASK)) {
 			fxs->lasttxhook &= SLIC_LF_SETMASK;
 			if (debug & DEBUG_CARD) {
-				dev_info(&wc->vb.pdev->dev, "SLIC_LF OK: intcount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->intcount, card, res, fxs->lasttxhook);
+				dev_info(&wc->vb.pdev->dev, "SLIC_LF OK: framecount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->framecount, card, res, fxs->lasttxhook);
 			}
-		} else if (!(wc->intcount & 0x03)) {
+		} else if (!(wc->framecount & 0x03)) {
 			mod->sethook = CMD_WR(LINE_STATE, fxs->lasttxhook);
 			if (debug & DEBUG_CARD) {
-				dev_info(&wc->vb.pdev->dev, "SLIC_LF RETRY: intcount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->intcount, card, res, fxs->lasttxhook);
+				dev_info(&wc->vb.pdev->dev, "SLIC_LF RETRY: framecount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->framecount, card, res, fxs->lasttxhook);
 			}
 		}
 	}
 	if (debug & DEBUG_CARD) {
-		if (!(wc->intcount % 100)) {
-			dev_info(&wc->vb.pdev->dev, "SLIC_LF DEBUG: intcount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->intcount, card, res, fxs->lasttxhook);
+		if (!(wc->framecount % 100)) {
+			dev_info(&wc->vb.pdev->dev, "SLIC_LF DEBUG: framecount=%d channel=%d shadow=%02x lasttxhook=%02x\n", wc->framecount, card, res, fxs->lasttxhook);
 		}
 	}
 #endif
@@ -1929,7 +1929,7 @@
 	abs_voltage = abs(b);
 
 	if (fxovoltage) {
-		if (!(wc->intcount % 100)) {
+		if (!(wc->framecount % 100)) {
 			dev_info(&wc->vb.pdev->dev, "Port %d: Voltage: %d  Debounce %d\n", mod->card + 1, b, fxo->battdebounce);
 		}
 	}
@@ -2184,8 +2184,8 @@
 
 		if (debug & DEBUG_CARD) {
 			dev_info(&wc->vb.pdev->dev, "Setting FXS hook state "
-				 "to %d (%02x) intcount=%d\n", txsig, x,
-				 wc->intcount);
+				 "to %d (%02x) framecount=%ld\n", txsig, x,
+				 wc->framecount);
 		}
 	} else {
 		spin_unlock_irqrestore(&wc->reglock, flags);
@@ -2360,7 +2360,7 @@
 {
 	struct fxs *const fxs = &mod->mod.fxs;
 
-	if (!(wc->intcount % 10000)) {
+	if (!(wc->framecount % 10000)) {
 		/* Accept an alarm once per 10 seconds */
 		if (fxs->palarms)
 			fxs->palarms--;
@@ -2369,7 +2369,7 @@
 
 	wctdm_proslic_check_oppending(wc, mod);
 
-	if (!(wc->intcount & 0xfc))	/* every 256ms */
+	if (!(wc->framecount & 0xfc))	/* every 256ms */
 		wctdm_proslic_recheck_sanity(wc, mod);
 	if (SLIC_LF_RINGING == fxs->lasttxhook) {
 		/* RINGing, prepare for OHT */
@@ -2472,7 +2472,7 @@
 		memset(vbb->data, 0, sizeof(vbb->data));
 		wctdm_transmitprep(wc, vbb->data);
 		wctdm_isr_misc(wc);
-		wc->intcount++;
+		wc->framecount++;
 	}
 }
 

Modified: linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h?view=diff&rev=10127&r1=10126&r2=10127
==============================================================================
--- linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h (original)
+++ linux/team/sruffell/wctdm24xxp-updates/drivers/dahdi/wctdm24xxp/wctdm24xxp.h Fri Aug 12 19:36:07 2011
@@ -242,7 +242,7 @@
 	spinlock_t frame_list_lock;
 	struct list_head frame_list;
 
-	unsigned int intcount;
+	unsigned long framecount;
 	unsigned char txident;
 	unsigned char rxident;
 




More information about the svn-commits mailing list