]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 7630/1: mmc: mmci: Fixup and cleanup code for DMA handling
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 21 Jan 2013 20:29:34 +0000 (21:29 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 28 Jan 2013 14:14:48 +0000 (14:14 +0000)
commita4114a4625875f47dbbb114fd8c637ab13d05237
tree3a35ac7f272c12d10dc3dd56ff601df597e5af9a
parente35bce039bf975dba4f0b2467baacdc082973771
ARM: 7630/1: mmc: mmci: Fixup and cleanup code for DMA handling

The cookie is now used to indicate if dma_unmap_sg shall be
done in post_request. At DMA errors, the DMA job is immediately
not only terminated but also unmapped. To indicate that this
has been done the cookie is reset to zero. post_request will
thus only do dma_umap_sg for requests which has a cookie not set
to zero.

Some corresponding duplicated code could then be removed and
moreover some corrections at DMA errors for terminating the same
DMA job twice has also been fixed.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Per Forlin <per.forlin@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/mmc/host/mmci.c