[zaptel-commits] kpfleming: branch 1.2 r2756 - in /branches/1.2: ./ wct4xxp/ wctc4xxp/

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Wed Jul 18 21:05:03 CDT 2007


Author: kpfleming
Date: Wed Jul 18 21:05:03 2007
New Revision: 2756

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2756
Log:
update to 2.6.22 request_irq() flags

Modified:
    branches/1.2/pciradio.c
    branches/1.2/tor2.c
    branches/1.2/torisa.c
    branches/1.2/wcfxo.c
    branches/1.2/wct1xxp.c
    branches/1.2/wct4xxp/base.c
    branches/1.2/wctc4xxp/base.c
    branches/1.2/wctdm.c
    branches/1.2/wctdm24xxp.c
    branches/1.2/wcte11xp.c
    branches/1.2/wcte12xp.c
    branches/1.2/zaptel.h
    branches/1.2/ztdummy.c

Modified: branches/1.2/pciradio.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/pciradio.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/pciradio.c (original)
+++ branches/1.2/pciradio.c Wed Jul 18 21:05:03 2007
@@ -1711,7 +1711,7 @@
 
 			}
 
-			if (request_irq(pdev->irq, pciradio_interrupt, SA_SHIRQ, "pciradio", rad)) {
+			if (request_irq(pdev->irq, pciradio_interrupt, ZAP_IRQ_SHARED, "pciradio", rad)) {
 				printk("pciradio: Unable to request IRQ %d\n", pdev->irq);
 				if (rad->freeregion)
 					release_region(rad->ioaddr, 0xff);

Modified: branches/1.2/tor2.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/tor2.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/tor2.c (original)
+++ branches/1.2/tor2.c Wed Jul 18 21:05:03 2007
@@ -534,7 +534,7 @@
 	for (x = 0; x < 256; x++) tor->mem32[x] = 0x7f7f7f7f;
 
 
-	if (request_irq(tor->irq, tor2_intr, SA_INTERRUPT | SA_SHIRQ, "tor2", tor)) {
+	if (request_irq(tor->irq, tor2_intr, ZAP_IRQ_SHARED_DISABLED, "tor2", tor)) {
 		printk(KERN_ERR "Unable to request tormenta IRQ %d\n", tor->irq);
 		goto err_out_release_all;
 	}

Modified: branches/1.2/torisa.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/torisa.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/torisa.c (original)
+++ branches/1.2/torisa.c Wed Jul 18 21:05:03 2007
@@ -1070,7 +1070,7 @@
 		printk(KERN_ERR "No ISA tormenta card found at %05lx\n", base);
 		return -EIO;
 	}
-	if (request_irq(irq, torisa_intr, SA_INTERRUPT, "torisa", NULL)) {
+	if (request_irq(irq, torisa_intr, ZAP_IRQ_DISABLED, "torisa", NULL)) {
 		printk(KERN_ERR "Unable to request tormenta IRQ %d\n", irq);
 		return -EIO;
 	}

Modified: branches/1.2/wcfxo.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcfxo.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/wcfxo.c (original)
+++ branches/1.2/wcfxo.c Wed Jul 18 21:05:03 2007
@@ -895,7 +895,7 @@
 			/* Keep track of which device we are */
 			pci_set_drvdata(pdev, wc);
 
-			if (request_irq(pdev->irq, wcfxo_interrupt, SA_SHIRQ, "wcfxo", wc)) {
+			if (request_irq(pdev->irq, wcfxo_interrupt, ZAP_IRQ_SHARED, "wcfxo", wc)) {
 				printk("wcfxo: Unable to request IRQ %d\n", pdev->irq);
 				if (wc->freeregion)
 					release_region(wc->ioaddr, 0xff);

Modified: branches/1.2/wct1xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct1xxp.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/wct1xxp.c (original)
+++ branches/1.2/wct1xxp.c Wed Jul 18 21:05:03 2007
@@ -1318,7 +1318,7 @@
 			/* Keep track of which device we are */
 			pci_set_drvdata(pdev, wc);
 
-			if (request_irq(pdev->irq, t1xxp_interrupt, SA_INTERRUPT | SA_SHIRQ, "t1xxp", wc)) {
+			if (request_irq(pdev->irq, t1xxp_interrupt, ZAP_IRQ_SHARED_DISABLED, "t1xxp", wc)) {
 				printk("t1xxp: Unable to request IRQ %d\n", pdev->irq);
 				kfree(wc);
 				return -EIO;

Modified: branches/1.2/wct4xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wct4xxp/base.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/wct4xxp/base.c (original)
+++ branches/1.2/wct4xxp/base.c Wed Jul 18 21:05:03 2007
@@ -3249,14 +3249,14 @@
 
 
 #ifdef SUPPORT_GEN1
-			if (request_irq(pdev->irq, (dt->flags & FLAG_2NDGEN) ? t4_interrupt_gen2 :t4_interrupt, SA_INTERRUPT | SA_SHIRQ, (wc->numspans == 2) ? "wct2xxp" : "wct4xxp", wc)) 
+			if (request_irq(pdev->irq, (dt->flags & FLAG_2NDGEN) ? t4_interrupt_gen2 :t4_interrupt, ZAP_IRQ_SHARED_DISABLED, (wc->numspans == 2) ? "wct2xxp" : "wct4xxp", wc)) 
 #else
 			if (!(wc->tspans[0]->spanflags & FLAG_2NDGEN)) {
 				printk("This driver does not support 1st gen modules\n");
 				kfree(wc);
 				return -ENODEV;
 			}	
-			if (request_irq(pdev->irq, t4_interrupt_gen2, SA_INTERRUPT | SA_SHIRQ, "t4xxp", wc)) 
+			if (request_irq(pdev->irq, t4_interrupt_gen2, ZAP_IRQ_SHARED_DISABLED, "t4xxp", wc)) 
 #endif
 			{
 				printk("t4xxp: Unable to request IRQ %d\n", pdev->irq);

Modified: branches/1.2/wctc4xxp/base.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctc4xxp/base.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/wctc4xxp/base.c (original)
+++ branches/1.2/wctc4xxp/base.c Wed Jul 18 21:05:03 2007
@@ -1688,7 +1688,7 @@
 			/* Keep track of which device we are */
 			pci_set_drvdata(pdev, wc);
 
-			if (request_irq(pdev->irq, wcdte_interrupt, SA_SHIRQ, "tc400b", wc)) {
+			if (request_irq(pdev->irq, wcdte_interrupt, ZAP_IRQ_SHARED, "tc400b", wc)) {
 				printk("wcdte error: Unable to request IRQ %d\n", pdev->irq);
 				if (wc->freeregion)
 					release_region(wc->iobase, 0xff);

Modified: branches/1.2/wctdm.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/wctdm.c (original)
+++ branches/1.2/wctdm.c Wed Jul 18 21:05:03 2007
@@ -2236,7 +2236,7 @@
 			/* Keep track of which device we are */
 			pci_set_drvdata(pdev, wc);
 
-			if (request_irq(pdev->irq, wctdm_interrupt, SA_SHIRQ, "wctdm", wc)) {
+			if (request_irq(pdev->irq, wctdm_interrupt, ZAP_IRQ_SHARED, "wctdm", wc)) {
 				printk("wctdm: Unable to request IRQ %d\n", pdev->irq);
 				if (wc->freeregion)
 					release_region(wc->ioaddr, 0xff);

Modified: branches/1.2/wctdm24xxp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wctdm24xxp.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/wctdm24xxp.c (original)
+++ branches/1.2/wctdm24xxp.c Wed Jul 18 21:05:03 2007
@@ -2781,7 +2781,7 @@
 			/* Keep track of which device we are */
 			pci_set_drvdata(pdev, wc);
 
-			if (request_irq(pdev->irq, wctdm_interrupt, SA_SHIRQ, wc->variety, wc)) {
+			if (request_irq(pdev->irq, wctdm_interrupt, ZAP_IRQ_SHARED, wc->variety, wc)) {
 				printk("wctdm24xxp: Unable to request IRQ %d\n", pdev->irq);
 				if (wc->freeregion)
 					release_region(wc->iobase, 0xff);

Modified: branches/1.2/wcte11xp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcte11xp.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/wcte11xp.c (original)
+++ branches/1.2/wcte11xp.c Wed Jul 18 21:05:03 2007
@@ -1492,7 +1492,7 @@
 			/* Keep track of which device we are */
 			pci_set_drvdata(pdev, wc);
 
-			if (request_irq(pdev->irq, t1xxp_interrupt, SA_INTERRUPT | SA_SHIRQ, "wcte11xp", wc)) {
+			if (request_irq(pdev->irq, t1xxp_interrupt, ZAP_IRQ_SHARED_DISABLED, "wcte11xp", wc)) {
 				printk("wcte11xp: Unable to request IRQ %d\n", pdev->irq);
 				kfree(wc);
 				return -EIO;

Modified: branches/1.2/wcte12xp.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/wcte12xp.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/wcte12xp.c (original)
+++ branches/1.2/wcte12xp.c Wed Jul 18 21:05:03 2007
@@ -1927,7 +1927,7 @@
 	/* Keep track of which device we are */
 	pci_set_drvdata(pdev, wc);
 	
-	if (request_irq(pdev->irq, te12xp_interrupt, SA_SHIRQ, te12xp_driver.name, wc)) {
+	if (request_irq(pdev->irq, te12xp_interrupt, ZAP_IRQ_SHARED, te12xp_driver.name, wc)) {
 		module_printk("Unable to request IRQ %d\n", pdev->irq);
 		if (wc->freeregion)
 			release_region(wc->iobase, 0xff);

Modified: branches/1.2/zaptel.h
URL: http://svn.digium.com/view/zaptel/branches/1.2/zaptel.h?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/zaptel.h (original)
+++ branches/1.2/zaptel.h Wed Jul 18 21:05:03 2007
@@ -68,6 +68,16 @@
 #endif
 #else
 #define ZAP_IRQ_HANDLER(a) static void a(int irq, void *dev_id, struct pt_regs *regs)
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+#define ZAP_IRQ_SHARED IRQF_SHARED
+#define ZAP_IRQ_DISABLED IRQF_DISABLED
+#define ZAP_IRQ_SHARED_DISABLED IRQF_SHARED | IRQF_DISABLED
+#else
+#define ZAP_IRQ_SHARED SA_SHIRQ
+#define ZAP_IRQ_DISABLED SA_INTERRUPT
+#define ZAP_IRQ_SHARED_DISABLED SA_SHIRQ | SA_INTERRUPT
 #endif
 
 #include "ecdis.h"

Modified: branches/1.2/ztdummy.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztdummy.c?view=diff&rev=2756&r1=2755&r2=2756
==============================================================================
--- branches/1.2/ztdummy.c (original)
+++ branches/1.2/ztdummy.c Wed Jul 18 21:05:03 2007
@@ -265,13 +265,13 @@
     irq=s->irq;
     spin_lock_irq(&mylock);
     free_irq(s->irq, s);	/* remove uhci_interrupt temporaly */
-    if (request_irq (irq, ztdummy_interrupt, SA_SHIRQ, "ztdummy", ztd)) {
+    if (request_irq (irq, ztdummy_interrupt, ZAP_IRQ_SHARED, "ztdummy", ztd)) {
     	spin_unlock_irq(&mylock);
 		err("Our request_irq %d failed!",irq);
 		kfree(ztd);
 		return -EIO;
     }		/* we add our handler first, to assure, that our handler gets called first */
-    if (request_irq (irq, uhci_interrupt, SA_SHIRQ, s->uhci_pci->driver->name, s)) {
+    if (request_irq (irq, uhci_interrupt, ZAP_IRQ_SHARED, s->uhci_pci->driver->name, s)) {
         spin_unlock_irq(&mylock);
 		err("Original request_irq %d failed!",irq);
     }




More information about the zaptel-commits mailing list