summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorIra Snyder <iws@ovro.caltech.edu>2009-05-15 14:27:16 -0700
committerLi Yang <leoli@freescale.com>2009-05-22 16:51:28 +0800
commitbcfb7465c03a8c62c89da374677df56f6b894d44 (patch)
tree70194cbfab5fb172bcbf7b8443082a721589f04c /drivers/md
parent138ef0185177a6d221d24b6aa8f12d867fbbef90 (diff)
downloadlinux-bcfb7465c03a8c62c89da374677df56f6b894d44.tar.gz
linux-bcfb7465c03a8c62c89da374677df56f6b894d44.tar.bz2
linux-bcfb7465c03a8c62c89da374677df56f6b894d44.zip
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>
Diffstat (limited to 'drivers/md')
0 files changed, 0 insertions, 0 deletions