All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: John Ogness <john.ogness@linutronix.de>, linux-kernel@vger.kernel.org
Cc: linux-serial@vger.kernel.org, Sekhar Nori <nsekhar@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 1/3] ARM: common: edma: clear completion interrupts on stop
Date: Mon, 27 Apr 2015 14:55:26 +0300	[thread overview]
Message-ID: <553E23AE.5010601@ti.com> (raw)
In-Reply-To: <87wq0xaivk.fsf@linutronix.de>

On 04/27/2015 02:52 PM, John Ogness wrote:
> When stopping a DMA transfer with interrupts disabled it is possible
> that the DMA transfer completes before the events are cleared. In
> this case the completion interrupt will be pending, causing a
> completion callback after the transfer was stopped.
> 
> By clearing the completion interrupt for the stopping channel it is
> ensured that no completion event will be generated after the stop.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>


> Signed-off-by: John Ogness <john.ogness@linutronix.de>
> ---
>  arch/arm/common/edma.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> index 5662a87..873dbfc 100644
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> @@ -1350,6 +1350,9 @@ void edma_stop(unsigned channel)
>  		edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
>  		edma_write_array(ctlr, EDMA_EMCR, j, mask);
>  
> +		/* clear possibly pending completion interrupt */
> +		edma_shadow0_write_array(ctlr, SH_ICR, j, mask);
> +
>  		pr_debug("EDMA: EER%d %08x\n", j,
>  				edma_shadow0_read_array(ctlr, SH_EER, j));
>  
> 


-- 
Péter

WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: John Ogness <john.ogness@linutronix.de>, <linux-kernel@vger.kernel.org>
Cc: <linux-serial@vger.kernel.org>, Sekhar Nori <nsekhar@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 1/3] ARM: common: edma: clear completion interrupts on stop
Date: Mon, 27 Apr 2015 14:55:26 +0300	[thread overview]
Message-ID: <553E23AE.5010601@ti.com> (raw)
In-Reply-To: <87wq0xaivk.fsf@linutronix.de>

On 04/27/2015 02:52 PM, John Ogness wrote:
> When stopping a DMA transfer with interrupts disabled it is possible
> that the DMA transfer completes before the events are cleared. In
> this case the completion interrupt will be pending, causing a
> completion callback after the transfer was stopped.
> 
> By clearing the completion interrupt for the stopping channel it is
> ensured that no completion event will be generated after the stop.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>


> Signed-off-by: John Ogness <john.ogness@linutronix.de>
> ---
>  arch/arm/common/edma.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/common/edma.c b/arch/arm/common/edma.c
> index 5662a87..873dbfc 100644
> --- a/arch/arm/common/edma.c
> +++ b/arch/arm/common/edma.c
> @@ -1350,6 +1350,9 @@ void edma_stop(unsigned channel)
>  		edma_shadow0_write_array(ctlr, SH_SECR, j, mask);
>  		edma_write_array(ctlr, EDMA_EMCR, j, mask);
>  
> +		/* clear possibly pending completion interrupt */
> +		edma_shadow0_write_array(ctlr, SH_ICR, j, mask);
> +
>  		pr_debug("EDMA: EER%d %08x\n", j,
>  				edma_shadow0_read_array(ctlr, SH_EER, j));
>  
> 


-- 
Péter

  reply	other threads:[~2015-04-27 11:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 11:52 [PATCH 1/3] ARM: common: edma: clear completion interrupts on stop John Ogness
2015-04-27 11:52 ` John Ogness
2015-04-27 11:55 ` Peter Ujfalusi [this message]
2015-04-27 11:55   ` Peter Ujfalusi

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=553E23AE.5010601@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /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.