dmaengine: fix xor sources continuation
authorXuelin Shi <xuelin.shi@freescale.com>
Tue, 1 Jul 2014 08:32:38 +0000 (16:32 +0800)
committerDan Williams <dan.j.williams@intel.com>
Thu, 21 Aug 2014 17:20:52 +0000 (10:20 -0700)
the partial xor result must be kept until the next
tx is generated.

Cc: <stable@vger.kernel.org>
Signed-off-by: Xuelin Shi <xuelin.shi@freescale.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
crypto/async_tx/async_xor.c

index 3c562f5a60bbb34f19e6b90f4d858b04d3d496e2..e1bce26cd4f9098f2765ffbf0f8e2f00017a9219 100644 (file)
@@ -78,8 +78,6 @@ do_async_xor(struct dma_chan *chan, struct dmaengine_unmap_data *unmap,
                tx = dma->device_prep_dma_xor(chan, dma_dest, src_list,
                                              xor_src_cnt, unmap->len,
                                              dma_flags);
-               src_list[0] = tmp;
-
 
                if (unlikely(!tx))
                        async_tx_quiesce(&submit->depend_tx);
@@ -92,6 +90,7 @@ do_async_xor(struct dma_chan *chan, struct dmaengine_unmap_data *unmap,
                                                      xor_src_cnt, unmap->len,
                                                      dma_flags);
                }
+               src_list[0] = tmp;
 
                dma_set_unmap(tx, unmap);
                async_tx_submit(chan, tx, submit);