linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] dmaenegine: edma: allow pause/resume for non-cyclic mode
@ 2015-04-27 11:52 John Ogness
  2015-04-27 11:55 ` Peter Ujfalusi
  0 siblings, 1 reply; 2+ messages in thread
From: John Ogness @ 2015-04-27 11:52 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-serial, Sekhar Nori, Peter Ujfalusi, Greg Kroah-Hartman,
	Sebastian Andrzej Siewior

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 <john.ogness@linutronix.de>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-27 11:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-27 11:52 [PATCH 2/3] dmaenegine: edma: allow pause/resume for non-cyclic mode John Ogness
2015-04-27 11:55 ` Peter Ujfalusi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).