Skip to content

Commit

Permalink
dmaenegine: edma: allow pause/resume for non-cyclic mode
Browse files Browse the repository at this point in the history
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>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
John Ogness authored and Greg Kroah-Hartman committed May 6, 2015
1 parent c2d4bb9 commit 02ec604
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/dma/edma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down

0 comments on commit 02ec604

Please sign in to comment.