Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932589AbbD0Lwd (ORCPT ); Mon, 27 Apr 2015 07:52:33 -0400 Received: from www.linutronix.de ([62.245.132.108]:47741 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932353AbbD0Lwa (ORCPT ); Mon, 27 Apr 2015 07:52:30 -0400 From: John Ogness To: linux-kernel@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: Sekhar Nori Cc: Peter Ujfalusi Cc: Greg Kroah-Hartman Cc: Sebastian Andrzej Siewior Subject: [PATCH 2/3] dmaenegine: edma: allow pause/resume for non-cyclic mode Date: Mon, 27 Apr 2015 13:52:25 +0200 Message-ID: <87vbghaiva.fsf@linutronix.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1377 Lines: 43 The 8250_omap serial driver relies on dmaengine_pause() actually pausing the DMA transfer. Before this patch dmaengine_pause() is a NOP for non-cylic DMA transfers. This allowed the 8250_omap driver to read DMA buffers while the DMA was still active, resulting in lost serial data. Signed-off-by: John Ogness --- drivers/dma/edma.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index bf09db7..88853af 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -300,8 +300,7 @@ static int edma_dma_pause(struct dma_chan *chan) { struct edma_chan *echan = to_edma_chan(chan); - /* Pause/Resume only allowed with cyclic mode */ - if (!echan->edesc || !echan->edesc->cyclic) + if (!echan->edesc) return -EINVAL; edma_pause(echan->ch_num); @@ -312,10 +311,6 @@ static int edma_dma_resume(struct dma_chan *chan) { struct edma_chan *echan = to_edma_chan(chan); - /* Pause/Resume only allowed with cyclic mode */ - if (!echan->edesc->cyclic) - return -EINVAL; - edma_resume(echan->ch_num); return 0; } -- 1.7.10.4 -- 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/