]> www.infradead.org Git - users/dwmw2/linux.git/commit
async_tx: Fix DMA_PREP_FENCE usage in do_async_gen_syndrome()
authorAnup Patel <anup.patel@broadcom.com>
Mon, 15 May 2017 05:04:53 +0000 (10:34 +0530)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:36:24 +0000 (21:36 -0400)
commit74ea8ad5a050a93c4124c5f06139ca50b061013a
tree0000bd3e8307b520c05289a1197c7861a959e764
parent34dee68c78b4b48e0c55e1c3097c50005544f00e
async_tx: Fix DMA_PREP_FENCE usage in do_async_gen_syndrome()

[ Upstream commit baae03a0e2497f49704628fd0aaf993cf98e1b99 ]

The DMA_PREP_FENCE is to be used when preparing Tx descriptor if output
of Tx descriptor is to be used by next/dependent Tx descriptor.

The DMA_PREP_FENSE will not be set correctly in do_async_gen_syndrome()
when calling dma->device_prep_dma_pq() under following conditions:
1. ASYNC_TX_FENCE not set in submit->flags
2. DMA_PREP_FENCE not set in dma_flags
3. src_cnt (= (disks - 2)) is greater than dma_maxpq(dma, dma_flags)

This patch fixes DMA_PREP_FENCE usage in do_async_gen_syndrome() taking
inspiration from do_async_xor() implementation.

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
crypto/async_tx/async_pq.c