[dahdi-commits] sruffell: branch linux/2.6 r10593 - /linux/branches/2.6/drivers/dahdi/wct4xxp/

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


Author: sruffell
Date: Thu Mar 22 13:36:10 2012
New Revision: 10593

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10593
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>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10589

Modified:
    linux/branches/2.6/drivers/dahdi/wct4xxp/base.c

Modified: linux/branches/2.6/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/branches/2.6/drivers/dahdi/wct4xxp/base.c?view=diff&rev=10593&r1=10592&r2=10593
==============================================================================
--- linux/branches/2.6/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/branches/2.6/drivers/dahdi/wct4xxp/base.c Thu Mar 22 13:36:10 2012
@@ -3784,7 +3784,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;
@@ -3852,6 +3852,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,
@@ -3969,7 +3979,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;
@@ -4165,6 +4175,16 @@
 	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
 static int t4_reset_dma(struct t4 *wc)
 {
@@ -5212,7 +5232,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",
@@ -5224,7 +5244,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