History

dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag

For interrupt controller that doesn't support irq_disable and hardware with level interrupt, an extra interrupt can be pending. This patch fixes the issue by setting IRQ_DISABLE_UNLAZY flag for the interrupt line. Reference: http://git.kernel.org/tip/e9849777d0e27cdd2902805be51da73e7c79578c

Rameshwar Prasad Sahu committed 10 years ago

Commit b0b79021 parent b02bab61 file · +4 −0Browse files

Unified · Split

drivers/dma/xgene-dma.c+4−0
@@ -29,6 +29,7 @@ · 28 unmodified lines
2929 #include <linux/dmapool.h>
3030 #include <linux/interrupt.h>
3131 #include <linux/io.h>
32+#include <linux/irq.h>
3233 #include <linux/module.h>
3334 #include <linux/of_device.h>
3435
@@ -1610,6 +1611,7 @@ static int xgene_dma_request_irqs(struct xgene_dma *pdma) · 1575 unmodified lines
16101611 /* Register DMA channel rx irq */
16111612 for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) {
16121613 chan = &pdma->chan[i];
1614+ irq_set_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
16131615 ret = devm_request_irq(chan->dev, chan->rx_irq,
16141616 xgene_dma_chan_ring_isr,
16151617 0, chan->name, chan);
@@ -1620,6 +1622,7 @@ static int xgene_dma_request_irqs(struct xgene_dma *pdma) · 4 unmodified lines
16201622
16211623 for (j = 0; j < i; j++) {
16221624 chan = &pdma->chan[i];
1625+ irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
16231626 devm_free_irq(chan->dev, chan->rx_irq, chan);
16241627 }
16251628
@@ -1640,6 +1643,7 @@ static void xgene_dma_free_irqs(struct xgene_dma *pdma) · 14 unmodified lines
16401643
16411644 for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) {
16421645 chan = &pdma->chan[i];
1646+ irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
16431647 devm_free_irq(chan->dev, chan->rx_irq, chan);
16441648 }
16451649 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t