2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 18:53:52 +08:00
linux-next/drivers/dma
Ira Snyder bcfb7465c0 fsldma: fix infinite loop on multi-descriptor DMA chain completion
When creating a DMA transaction with multiple descriptors, the async_tx
cookie is set to 0 for each descriptor in the chain, excluding the last
descriptor, whose cookie is set to -EBUSY.

When fsl_dma_tx_submit() is run, it only assigns a cookie to the first
descriptor. All of the remaining descriptors keep their original value,
including the last descriptor, which is set to -EBUSY.

After the DMA completes, the driver will update the last completed cookie
to be -EBUSY, which is an error code instead of a valid cookie. This causes
dma_async_is_complete() to always return DMA_IN_PROGRESS.

This causes the fsldma driver to never cleanup the queue of link
descriptors, and the driver will re-run the DMA transaction on the hardware
each time it receives the End-of-Chain interrupt. This causes an infinite
loop.

With this patch, fsl_dma_tx_submit() is changed to assign a cookie to every
descriptor in the chain. The rest of the code then works without problems.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Signed-off-by: Li Yang <leoli@freescale.com>
2009-05-22 16:51:28 +08:00
..
ipu dma: fix ipu_idmac.c to not discard the last queued buffer 2009-05-12 14:41:48 -07:00
dmaengine.c ioatdma: fix "ioatdma frees DMA memory with wrong function" 2009-05-12 14:41:47 -07:00
dmatest.c dmatest: fix max channels handling 2009-04-08 15:08:23 -07:00
dw_dmac_regs.h dw_dmac: add cyclic API to DW DMA driver 2009-04-01 15:42:34 -07:00
dw_dmac.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx 2009-04-03 12:13:45 -07:00
fsldma.c fsldma: fix infinite loop on multi-descriptor DMA chain completion 2009-05-22 16:51:28 +08:00
fsldma.h fsldma: allow Freescale Elo DMA driver to be compiled as a module 2008-09-26 17:00:11 -07:00
ioat_dca.c I/OAT: update driver version and copyright dates 2009-03-04 16:04:40 -07:00
ioat_dma.c ioatdma: fix "ioatdma frees DMA memory with wrong function" 2009-05-12 14:41:47 -07:00
ioat.c dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
ioatdma_hw.h I/OAT: update driver version and copyright dates 2009-03-04 16:04:40 -07:00
ioatdma_registers.h I/OAT: update driver version and copyright dates 2009-03-04 16:04:40 -07:00
ioatdma.h I/OAT: update driver version and copyright dates 2009-03-04 16:04:40 -07:00
iop-adma.c dmaengine: initialize tx_list in dma_async_tx_descriptor_init 2009-03-25 09:13:24 -07:00
iovlock.c [2/4] I/OAT: fix dma_pin_iovec_pages() error handling 2008-11-10 15:00:56 -08:00
Kconfig dmaengine: allow dma support for async_tx to be toggled 2009-03-25 09:13:25 -07:00
Makefile i.MX31: Image Processing Unit DMA and IRQ drivers 2009-01-19 15:36:21 -07:00
mv_xor.c dmaengine: initialize tx_list in dma_async_tx_descriptor_init 2009-03-25 09:13:24 -07:00
mv_xor.h dmaengine: DMA engine driver for Marvell XOR engine 2008-07-08 11:58:36 -07:00