From: vinod.koul@intel.com (Vinod Koul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag
Date: Wed, 6 Jan 2016 14:43:23 +0530 [thread overview]
Message-ID: <20160106091323.GP2940@localhost> (raw)
In-Reply-To: <1450875495-2229-1-git-send-email-rsahu@apm.com>
On Wed, Dec 23, 2015 at 06:28:15PM +0530, Rameshswar Prasad Sahu wrote:
> From: Rameshwar Prasad Sahu <rsahu@apm.com>
>
> 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
I seem to have got this patch thrice :(
>
> Signed-off-by: Rameshwar Prasad Sahu <rsahu@apm.com>
> ---
> drivers/dma/xgene-dma.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c
> index 9dfa2b0..6363e84 100644
> --- a/drivers/dma/xgene-dma.c
> +++ b/drivers/dma/xgene-dma.c
> @@ -29,6 +29,7 @@
> #include <linux/dmapool.h>
> #include <linux/interrupt.h>
> #include <linux/io.h>
> +#include <linux/irq.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
>
> @@ -1610,6 +1611,7 @@ static int xgene_dma_request_irqs(struct xgene_dma *pdma)
> /* Register DMA channel rx irq */
> for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) {
> chan = &pdma->chan[i];
> + irq_set_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
Why not use irq_settings_disable_unlazy(), at least read the reference you
pointed out!
> ret = devm_request_irq(chan->dev, chan->rx_irq,
> xgene_dma_chan_ring_isr,
> 0, chan->name, chan);
> @@ -1620,6 +1622,7 @@ static int xgene_dma_request_irqs(struct xgene_dma *pdma)
>
> for (j = 0; j < i; j++) {
> chan = &pdma->chan[i];
> + irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
> devm_free_irq(chan->dev, chan->rx_irq, chan);
> }
>
> @@ -1640,6 +1643,7 @@ static void xgene_dma_free_irqs(struct xgene_dma *pdma)
>
> for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) {
> chan = &pdma->chan[i];
> + irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
> devm_free_irq(chan->dev, chan->rx_irq, chan);
> }
> }
> --
> 1.7.1
--
~Vinod
WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vinod.koul@intel.com>
To: Rameshswar Prasad Sahu <rsahu@apm.com>
Cc: dan.j.williams@intel.com, dmaengine@vger.kernel.org,
arnd@arndb.de, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
jcm@redhat.com, patches@apm.com, kgondkar@apm.com
Subject: Re: [PATCH] dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag
Date: Wed, 6 Jan 2016 14:43:23 +0530 [thread overview]
Message-ID: <20160106091323.GP2940@localhost> (raw)
In-Reply-To: <1450875495-2229-1-git-send-email-rsahu@apm.com>
On Wed, Dec 23, 2015 at 06:28:15PM +0530, Rameshswar Prasad Sahu wrote:
> From: Rameshwar Prasad Sahu <rsahu@apm.com>
>
> 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
I seem to have got this patch thrice :(
>
> Signed-off-by: Rameshwar Prasad Sahu <rsahu@apm.com>
> ---
> drivers/dma/xgene-dma.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/dma/xgene-dma.c b/drivers/dma/xgene-dma.c
> index 9dfa2b0..6363e84 100644
> --- a/drivers/dma/xgene-dma.c
> +++ b/drivers/dma/xgene-dma.c
> @@ -29,6 +29,7 @@
> #include <linux/dmapool.h>
> #include <linux/interrupt.h>
> #include <linux/io.h>
> +#include <linux/irq.h>
> #include <linux/module.h>
> #include <linux/of_device.h>
>
> @@ -1610,6 +1611,7 @@ static int xgene_dma_request_irqs(struct xgene_dma *pdma)
> /* Register DMA channel rx irq */
> for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) {
> chan = &pdma->chan[i];
> + irq_set_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
Why not use irq_settings_disable_unlazy(), at least read the reference you
pointed out!
> ret = devm_request_irq(chan->dev, chan->rx_irq,
> xgene_dma_chan_ring_isr,
> 0, chan->name, chan);
> @@ -1620,6 +1622,7 @@ static int xgene_dma_request_irqs(struct xgene_dma *pdma)
>
> for (j = 0; j < i; j++) {
> chan = &pdma->chan[i];
> + irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
> devm_free_irq(chan->dev, chan->rx_irq, chan);
> }
>
> @@ -1640,6 +1643,7 @@ static void xgene_dma_free_irqs(struct xgene_dma *pdma)
>
> for (i = 0; i < XGENE_DMA_MAX_CHANNEL; i++) {
> chan = &pdma->chan[i];
> + irq_clear_status_flags(chan->rx_irq, IRQ_DISABLE_UNLAZY);
> devm_free_irq(chan->dev, chan->rx_irq, chan);
> }
> }
> --
> 1.7.1
--
~Vinod
next prev parent reply other threads:[~2016-01-06 9:13 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-23 12:58 [PATCH] dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag Rameshswar Prasad Sahu
2016-01-06 9:13 ` Vinod Koul [this message]
2016-01-06 9:13 ` Vinod Koul
2016-01-06 9:21 ` Rameshwar Sahu
2016-01-06 9:21 ` Rameshwar Sahu
2016-01-06 9:21 ` Rameshwar Sahu
2016-01-06 9:31 ` Vinod Koul
2016-01-06 9:31 ` Vinod Koul
2016-01-06 9:32 ` Rameshwar Sahu
2016-01-06 9:32 ` Rameshwar Sahu
2016-01-06 9:32 ` Rameshwar Sahu
2016-01-06 10:05 ` Thomas Gleixner
2016-01-06 10:05 ` Thomas Gleixner
2016-01-06 10:05 ` Thomas Gleixner
[not found] ` <CAOHikRALt92uf598bH2hWq-QKOVRxd+OEjZ2pRkRj5-F8ApD5w@mail.gmail.com>
2016-01-06 10:12 ` Suman Tripathi
2016-01-06 10:12 ` Suman Tripathi
2016-01-06 10:12 ` Thomas Gleixner
2016-01-06 10:12 ` Thomas Gleixner
2016-01-06 10:12 ` Thomas Gleixner
2016-01-07 4:49 ` Vinod Koul
2016-01-07 4:49 ` Vinod Koul
2016-01-07 4:49 ` Vinod Koul
2016-01-07 5:40 ` Vinod Koul
2016-01-07 5:40 ` Vinod Koul
2016-01-07 5:40 ` Vinod Koul
-- strict thread matches above, loose matches on Subject: below --
2015-12-23 12:39 Rameshwar Prasad Sahu
2015-12-23 12:39 ` Rameshwar Prasad Sahu
2015-12-22 12:52 Rameshwar Prasad Sahu
2015-12-22 12:52 ` Rameshwar Prasad Sahu
2015-12-22 12:52 ` Rameshwar Prasad Sahu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160106091323.GP2940@localhost \
--to=vinod.koul@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.