Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932662AbbD0Lzk (ORCPT ); Mon, 27 Apr 2015 07:55:40 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:51830 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752920AbbD0Lzg (ORCPT ); Mon, 27 Apr 2015 07:55:36 -0400 Message-ID: <553E23AE.5010601@ti.com> Date: Mon, 27 Apr 2015 14:55:26 +0300 From: Peter Ujfalusi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: John Ogness , CC: , Sekhar Nori , Greg Kroah-Hartman , Sebastian Andrzej Siewior Subject: Re: [PATCH 1/3] ARM: common: edma: clear completion interrupts on stop References: <87wq0xaivk.fsf@linutronix.de> In-Reply-To: <87wq0xaivk.fsf@linutronix.de> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1420 Lines: 41 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 > Signed-off-by: John Ogness > --- > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/