[zaptel-commits] mattf: branch 1.2 r1936 - /branches/1.2/

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Tue Jan 23 14:28:15 MST 2007


Author: mattf
Date: Tue Jan 23 15:28:14 2007
New Revision: 1936

URL: http://svn.digium.com/view/zaptel?view=rev&rev=1936
Log:
Make sure we don't clear the interrupt before we might have received it in 
shared interrupt line scenarios.

Modified:
    branches/1.2/wct1xxp.c
    branches/1.2/wctdm.c
    branches/1.2/wctdm24xxp.c
    branches/1.2/wcte11xp.c

Modified: branches/1.2/wct1xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct1xxp.c?view=diff&rev=1936&r1=1935&r2=1936
==============================================================================
--- branches/1.2/wct1xxp.c (original)
+++ branches/1.2/wct1xxp.c Tue Jan 23 15:28:14 2007
@@ -1134,14 +1134,14 @@
 	int x;
 
 	ints = inb(wc->ioaddr + WC_INTSTAT);
-	outb(ints, wc->ioaddr + WC_INTSTAT);
-
 	if (!ints)
 #ifdef LINUX26
 		return IRQ_NONE;
 #else
 		return;
 #endif		
+
+	outb(ints, wc->ioaddr + WC_INTSTAT);
 
 	if (!wc->intcount) {
 		if (debug) printk("Got interrupt: 0x%04x\n", ints);

Modified: branches/1.2/wctdm.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm.c?view=diff&rev=1936&r1=1935&r2=1936
==============================================================================
--- branches/1.2/wctdm.c (original)
+++ branches/1.2/wctdm.c Tue Jan 23 15:28:14 2007
@@ -1032,7 +1032,6 @@
 	int mode;
 
 	ints = inb(wc->ioaddr + WC_INTSTAT);
-	outb(ints, wc->ioaddr + WC_INTSTAT);
 
 	if (!ints)
 #ifdef LINUX26
@@ -1040,6 +1039,8 @@
 #else
 		return;
 #endif		
+
+	outb(ints, wc->ioaddr + WC_INTSTAT);
 
 	if (ints & 0x10) {
 		/* Stop DMA, wait for watchdog */

Modified: branches/1.2/wctdm24xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm24xxp.c?view=diff&rev=1936&r1=1935&r2=1936
==============================================================================
--- branches/1.2/wctdm24xxp.c (original)
+++ branches/1.2/wctdm24xxp.c Tue Jan 23 15:28:14 2007
@@ -1428,7 +1428,6 @@
 
 	/* Read and clear interrupts */
 	ints = wctdm_getctl(wc, 0x0028);
-	wctdm_setctl(wc, 0x0028, ints);
 
 	if (!ints)
 #ifdef LINUX26
@@ -1436,6 +1435,9 @@
 #else
 		return;
 #endif		
+
+	wctdm_setctl(wc, 0x0028, ints);
+
 	ints &= wc->intmask;
 	if (ints & 0x00000041) {
 		do {

Modified: branches/1.2/wcte11xp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcte11xp.c?view=diff&rev=1936&r1=1935&r2=1936
==============================================================================
--- branches/1.2/wcte11xp.c (original)
+++ branches/1.2/wcte11xp.c Tue Jan 23 15:28:14 2007
@@ -1265,14 +1265,14 @@
 	int x;
 
 	ints = inb(wc->ioaddr + WC_INTSTAT);
-	outb(ints, wc->ioaddr + WC_INTSTAT);
-
 	if (!ints)
 #ifdef LINUX26
 		return IRQ_NONE;
 #else
 		return;
 #endif		
+
+	outb(ints, wc->ioaddr + WC_INTSTAT);
 
 	if (!wc->intcount) {
 		if (debug) printk("Got interrupt: 0x%04x\n", ints);



More information about the zaptel-commits mailing list