Commit 02ec6041 authored by John Ogness's avatar John Ogness Committed by Greg Kroah-Hartman

dmaenegine: edma: allow pause/resume for non-cyclic mode

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: default avatarJohn Ogness <john.ogness@linutronix.de>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c2d4bb9d
...@@ -300,8 +300,7 @@ static int edma_dma_pause(struct dma_chan *chan) ...@@ -300,8 +300,7 @@ static int edma_dma_pause(struct dma_chan *chan)
{ {
struct edma_chan *echan = to_edma_chan(chan); struct edma_chan *echan = to_edma_chan(chan);
/* Pause/Resume only allowed with cyclic mode */ if (!echan->edesc)
if (!echan->edesc || !echan->edesc->cyclic)
return -EINVAL; return -EINVAL;
edma_pause(echan->ch_num); edma_pause(echan->ch_num);
...@@ -312,10 +311,6 @@ static int edma_dma_resume(struct dma_chan *chan) ...@@ -312,10 +311,6 @@ static int edma_dma_resume(struct dma_chan *chan)
{ {
struct edma_chan *echan = to_edma_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); edma_resume(echan->ch_num);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment