[Asterisk-Users] some success with linux 2.6 and wcfxo

Tristan 'Minty' Colgate minty at deadweb.net
Sun Dec 7 10:11:20 MST 2003


oops, my apologiee for attaching the entire source of the drivers :( Here's a
diff....


Index: wcfxo.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcfxo.c,v
retrieving revision 1.21
diff -a -u -r1.21 wcfxo.c
--- wcfxo.c	17 Nov 2003 22:09:40 -0000	1.21
+++ wcfxo.c	7 Dec 2003 17:04:12 -0000
@@ -387,7 +387,7 @@
 static void wcfxo_stop_dma(struct wcfxo *wc);
 static void wcfxo_restart_dma(struct wcfxo *wc);
 
-static void wcfxo_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t wcfxo_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct wcfxo *wc = dev_id;
 	unsigned char ints;
@@ -402,7 +402,7 @@
 
 
 	if (!ints)
-		return;
+		return IRQ_NONE;
 
 	if (ints & 0x0c) {  /* if there is a rx interrupt pending */
 #ifdef ENABLE_TASKLETS
@@ -425,12 +425,12 @@
 		printk("FXO PCI Master abort\n");
 		/* Stop DMA andlet the watchdog start it again */
 		wcfxo_stop_dma(wc);
-		return;
+		return IRQ_HANDLED;
 	}
 
 	if (ints & 0x20) {
 		printk("PCI Target abort\n");
-		return;
+		return IRQ_HANDLED;
 	}
 	if (1 /* !(wc->report % 0xf) */) {
 		/* Check for BATTERY from register and debounce for 8 ms */
@@ -504,6 +504,7 @@
 #endif
 
 	}
+	return IRQ_HANDLED;
 }
 
 static int wcfxo_setreg(struct wcfxo *wc, unsigned char reg, unsigned char value)
Index: wcfxs.c
===================================================================
RCS file: /usr/cvsroot/zaptel/wcfxs.c,v
retrieving revision 1.39
diff -a -u -r1.39 wcfxs.c
--- wcfxs.c	23 Nov 2003 23:09:46 -0000	1.39
+++ wcfxs.c	7 Dec 2003 17:04:14 -0000
@@ -471,7 +471,7 @@
     return 0;
 }
 
-static void wcfxs_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t wcfxs_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct wcfxs *wc = dev_id;
 	unsigned char ints;
@@ -487,12 +487,12 @@
 		/* Stop DMA, wait for watchdog */
 		printk("FXS PCI Master abort\n");
 		wcfxs_stop_dma(wc);
-		return;
+		return IRQ_HANDLED;
 	}
 	
 	if (ints & 0x20) {
 		printk("PCI Target abort\n");
-		return;
+		return IRQ_NONE;
 	}
 
 	for (x=0;x<4;x++) {
@@ -535,7 +535,7 @@
 		wcfxs_transmitprep(wc, ints);
 	}
 	
-	
+	return IRQ_HANDLED;	
 }
 
 static int wcfxs_proslic_insane(struct wcfxs *wc, int card)
@@ -1277,6 +1277,7 @@
 	outb(0x3f, wc->ioaddr + WC_MASK0);
 	/* No external interrupts */
 	outb(0x00, wc->ioaddr + WC_MASK1);
+	
 }
 
 static void wcfxs_restart_dma(struct wcfxs *wc)



More information about the asterisk-users mailing list