Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: John Ogness <john.ogness@linutronix.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

John Ogness and committed by
Greg Kroah-Hartman
02ec6041 c2d4bb9d

+1 -6
+1 -6
drivers/dma/edma.c
··· 300 300 { 301 301 struct edma_chan *echan = to_edma_chan(chan); 302 302 303 - /* Pause/Resume only allowed with cyclic mode */ 304 - if (!echan->edesc || !echan->edesc->cyclic) 303 + if (!echan->edesc) 305 304 return -EINVAL; 306 305 307 306 edma_pause(echan->ch_num); ··· 310 311 static int edma_dma_resume(struct dma_chan *chan) 311 312 { 312 313 struct edma_chan *echan = to_edma_chan(chan); 313 - 314 - /* Pause/Resume only allowed with cyclic mode */ 315 - if (!echan->edesc->cyclic) 316 - return -EINVAL; 317 314 318 315 edma_resume(echan->ch_num); 319 316 return 0;