aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-18 15:05:53 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-18 15:05:53 -0500
commit59da1f87b276c593b852766c2fdcad62835970f7 (patch)
tree3c3ace81c2132aaf13223df10c4491c38a46c976 /crypto
parent69098bac169d630a777b362470f20451b9446e39 (diff)
parenta06d568f7c5e40e34ea64881842deb8f4382babf (diff)
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: async_xor: dma_map destination DMA_BIDIRECTIONAL dmaengine: protect 'id' from concurrent registrations ioat: wait for self-test completion
Diffstat (limited to 'crypto')
-rw-r--r--crypto/async_tx/async_xor.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c
index c029d3eb9ef0..595b78672b36 100644
--- a/crypto/async_tx/async_xor.c
+++ b/crypto/async_tx/async_xor.c
@@ -53,10 +53,17 @@ do_async_xor(struct dma_chan *chan, struct page *dest, struct page **src_list,
53 int xor_src_cnt; 53 int xor_src_cnt;
54 dma_addr_t dma_dest; 54 dma_addr_t dma_dest;
55 55
56 dma_dest = dma_map_page(dma->dev, dest, offset, len, DMA_FROM_DEVICE); 56 /* map the dest bidrectional in case it is re-used as a source */
57 for (i = 0; i < src_cnt; i++) 57 dma_dest = dma_map_page(dma->dev, dest, offset, len, DMA_BIDIRECTIONAL);
58 for (i = 0; i < src_cnt; i++) {
59 /* only map the dest once */
60 if (unlikely(src_list[i] == dest)) {
61 dma_src[i] = dma_dest;
62 continue;
63 }
58 dma_src[i] = dma_map_page(dma->dev, src_list[i], offset, 64 dma_src[i] = dma_map_page(dma->dev, src_list[i], offset,
59 len, DMA_TO_DEVICE); 65 len, DMA_TO_DEVICE);
66 }
60 67
61 while (src_cnt) { 68 while (src_cnt) {
62 async_flags = flags; 69 async_flags = flags;