mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-28 20:20:17 -04:00
mmc: sh_mmcif: unmap with the proper sglen
According to the DMA-API you shall unmap the sglists with the same sglist length as passed into the mapping function, not the returned value from the mapping function. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
committed by
Chris Ball
parent
1ed828dbb4
commit
9dc3fb5e45
@@ -195,11 +195,11 @@ static void mmcif_dma_complete(void *arg)
|
||||
|
||||
if (host->data->flags & MMC_DATA_READ)
|
||||
dma_unmap_sg(host->chan_rx->device->dev,
|
||||
host->data->sg, host->dma_sglen,
|
||||
host->data->sg, host->data->sg_len,
|
||||
DMA_FROM_DEVICE);
|
||||
else
|
||||
dma_unmap_sg(host->chan_tx->device->dev,
|
||||
host->data->sg, host->dma_sglen,
|
||||
host->data->sg, host->data->sg_len,
|
||||
DMA_TO_DEVICE);
|
||||
|
||||
complete(&host->dma_complete);
|
||||
|
||||
Reference in New Issue
Block a user