OSDN Git Service

dmaengine: mv_xor_v2: move unmap to before callback
authorHanna Hawa <hannah@marvell.com>
Tue, 17 Jul 2018 10:30:02 +0000 (13:30 +0300)
committerVinod Koul <vkoul@kernel.org>
Fri, 20 Jul 2018 09:31:58 +0000 (15:01 +0530)
commitc3a272c7b0c8995bab2116436b03e0e44b480c73
tree73bff070872fb05284309989d2783f8a76acdc31
parent5a80aff92ad28c5e3045b542576c1d08260606db
dmaengine: mv_xor_v2: move unmap to before callback

Completion callback should happen after dma_descriptor_unmap() has
happened. This allow the cache invalidate to happen and ensure that
the data accessed by the upper layer is in memory that was from DMA
rather than stale data. On some architecture this is done by the
hardware, however we should make the code consistent to not cause
confusion.

Signed-off-by: Hanna Hawa <hannah@marvell.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/mv_xor_v2.c