[dahdi-commits] sruffell: linux/trunk r10589 - /linux/trunk/drivers/dahdi/wct4xxp/base.c

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Mar 22 13:31:21 CDT 2012


Author: sruffell
Date: Thu Mar 22 13:31:17 2012
New Revision: 10589

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10589
Log:
wct4xxp: Disable all interrupts explicitly in interrupt handler.

The driver makes the assumption that interrupts are disabled but this cannot
be guaranteed. We'll explicity disable interrupts on the local processor while
the interrupt handler is running.

This eliminates the "IRQF_DISABLED is not guaranteed on shared IRQs" warning
when loading the driver.

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

Modified:
    linux/trunk/drivers/dahdi/wct4xxp/base.c

Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=10589&r1=10588&r2=10589
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Thu Mar 22 13:31:17 2012
@@ -3772,7 +3772,7 @@
 }
 
 #ifdef SUPPORT_GEN1
-DAHDI_IRQ_HANDLER(t4_interrupt)
+static irqreturn_t _t4_interrupt(int irq, void *dev_id)
 {
 	struct t4 *wc = dev_id;
 	unsigned long flags;
@@ -3840,6 +3840,16 @@
 
 	return IRQ_RETVAL(1);
 }
+
+DAHDI_IRQ_HANDLER(t4_interrupt)
+{
+	irqreturn_t ret;
+	unsigned long flags;
+	local_irq_save(flags);
+	ret = _t4_interrupt(irq, dev_id);
+	local_irq_restore(flags);
+	return ret;
+}
 #endif
 
 static int t4_allocate_buffers(struct t4 *wc, int numbufs,
@@ -3957,7 +3967,7 @@
 #endif
 }
 
-DAHDI_IRQ_HANDLER(t4_interrupt_gen2)
+static irqreturn_t _t4_interrupt_gen2(int irq, void *dev_id)
 {
 	struct t4 *wc = dev_id;
 	unsigned int status;
@@ -4151,6 +4161,16 @@
 #endif	
 
 	return IRQ_RETVAL(1);
+}
+
+DAHDI_IRQ_HANDLER(t4_interrupt_gen2)
+{
+	irqreturn_t ret;
+	unsigned long flags;
+	local_irq_save(flags);
+	ret = _t4_interrupt_gen2(irq, dev_id);
+	local_irq_restore(flags);
+	return ret;
 }
 
 #ifdef SUPPORT_GEN1
@@ -5183,7 +5203,7 @@
 #ifdef SUPPORT_GEN1
 	if (request_irq(pdev->irq, (wc->devtype->flags & FLAG_2NDGEN) ?
 					t4_interrupt_gen2 : t4_interrupt,
-			DAHDI_IRQ_SHARED_DISABLED,
+			DAHDI_IRQ_SHARED,
 			(wc->numspans == 8) ? "wct8xxp" :
 					      (wc->numspans == 2) ? "wct2xxp" :
 								    "wct4xxp",
@@ -5195,7 +5215,7 @@
 			free_wc(wc);
 			return -ENODEV;
 		}	
-	if (request_irq(pdev->irq, t4_interrupt_gen2, DAHDI_IRQ_SHARED_DISABLED, "t4xxp", wc)) 
+	if (request_irq(pdev->irq, t4_interrupt_gen2, DAHDI_IRQ_SHARED, "t4xxp", wc)) 
 #endif
 	{
 		dev_notice(&wc->dev->dev, "t4xxp: Unable to request IRQ %d\n",




More information about the dahdi-commits mailing list