[svn-commits] mattf: trunk r2516 - in /trunk/wct4xxp: base.c wct4xxp.h

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed May 16 15:35:26 MST 2007


Author: mattf
Date: Wed May 16 17:35:25 2007
New Revision: 2516

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2516
Log:
Optimize this further.  We actually should check the framer ASAP, so that its interrupt gets cleared

Modified:
    trunk/wct4xxp/base.c
    trunk/wct4xxp/wct4xxp.h

Modified: trunk/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/trunk/wct4xxp/base.c?view=diff&rev=2516&r1=2515&r2=2516
==============================================================================
--- trunk/wct4xxp/base.c (original)
+++ trunk/wct4xxp/base.c Wed May 16 17:35:25 2007
@@ -2808,19 +2808,6 @@
 static void t4_isr_bh(unsigned long data)
 {
 	struct t4 *wc = (struct t4 *)data;
-	unsigned char cis;
-
-	if (test_and_clear_bit(T4_CHECK_FRAMER, &wc->checkflag)) {
-		cis = t4_framer_in(wc, 0, FRMR_CIS);
-		if (cis & FRMR_CIS_GIS1)
-			t4_framer_interrupt(wc, 0);
-		if (cis & FRMR_CIS_GIS2)
-			t4_framer_interrupt(wc, 1);
-		if (cis & FRMR_CIS_GIS3)
-			t4_framer_interrupt(wc, 2);
-		if (cis & FRMR_CIS_GIS4)
-			t4_framer_interrupt(wc, 3);
-	}
 
 #ifdef VPM_SUPPORT
 	if (wc->vpm) {
@@ -2900,8 +2887,19 @@
 #endif
 	}
 
-	if (unlikely(status & 0x1))
-		set_bit(T4_CHECK_FRAMER, &wc->checkflag);
+	if (unlikely(status & 0x1)) {
+		unsigned char cis;
+
+		cis = t4_framer_in(wc, 0, FRMR_CIS);
+		if (cis & FRMR_CIS_GIS1)
+			t4_framer_interrupt(wc, 0);
+		if (cis & FRMR_CIS_GIS2)
+			t4_framer_interrupt(wc, 1);
+		if (cis & FRMR_CIS_GIS3)
+			t4_framer_interrupt(wc, 2);
+		if (cis & FRMR_CIS_GIS4)
+			t4_framer_interrupt(wc, 3);
+	}
 
 	if (wc->vpm) {
 		if (wc->vpm450m) {
@@ -2939,8 +2937,8 @@
 
 	spin_unlock(&wc->reglock);
 
-	if (unlikely(test_bit(T4_CHECK_VPM, &wc->checkflag) || test_bit(T4_CHECK_FRAMER, &wc->checkflag)))
-		tasklet_hi_schedule(&wc->t4_tlet);
+	if (unlikely(test_bit(T4_CHECK_VPM, &wc->checkflag)))
+		tasklet_schedule(&wc->t4_tlet);
 
 #ifndef ENABLE_WORKQUEUES
 	__t4_pci_out(wc, WC_INTR, 0);

Modified: trunk/wct4xxp/wct4xxp.h
URL: http://svn.digium.com/view/zaptel/trunk/wct4xxp/wct4xxp.h?view=diff&rev=2516&r1=2515&r2=2516
==============================================================================
--- trunk/wct4xxp/wct4xxp.h (original)
+++ trunk/wct4xxp/wct4xxp.h Wed May 16 17:35:25 2007
@@ -105,9 +105,7 @@
 	unsigned char regs[NUM_REGS];
 };
 
-#define T4_CHECK_FRAMER		0
-#define T4_CHECK_VPM		1
-#define T4_UPDATE_TIMERS	2
+#define T4_CHECK_VPM		0
 
 #define WCT4_GET_REGS	_IOW (ZT_CODE, 60, struct t4_regs)
 



More information about the svn-commits mailing list