dmaengine: imx-sdma: fix bug in buffer descriptor initialization
authorAnatolij Gustschin <agust@denx.de>
Mon, 22 Nov 2010 17:35:18 +0000 (18:35 +0100)
committerDan Williams <dan.j.williams@intel.com>
Sat, 4 Dec 2010 23:03:46 +0000 (15:03 -0800)
commitd2f5c276ea4b7b7e1b953926bac9d0b148fcce4e
tree5811fc0b75149a20fb5cdc7102d697ec699d005c
parenta584bff5efae8c1d026e3a930e3d13a90264fafc
dmaengine: imx-sdma: fix bug in buffer descriptor initialization

Currently while submitting scatterlists with more than one SG
entry the DMA buffer address from the first SG entry is inserted
into all initialized DMA buffer descriptors. This is due to the
typo in the for_each_sg() loop where the scatterlist pointer is
used for obtaining the DMA buffer address and _not_ the SG list
iterator.

As a result all received data will be written only into the first
DMA buffer while reading. While writing the data from the first
DMA buffer is send to the device multiple times. This caused
the filesystem destruction on the MMC card when using DMA in
mxcmmc driver.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/imx-sdma.c
This page took 0.024689 seconds and 5 git commands to generate.