]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: xilinx_dma: Fix race condition in the driver for multiple descriptor scenario
authorKedareswara rao Appana <appana.durga.rao@xilinx.com>
Thu, 7 Dec 2017 05:21:04 +0000 (10:51 +0530)
committerVinod Koul <vinod.koul@intel.com>
Mon, 18 Dec 2017 05:14:09 +0000 (10:44 +0530)
commit56ec9419922c07e9e9e83970fafe7a42028620e0
tree981e1a72913448e24faaa23d59513d8d82f8656a
parent178d6b96f363077d9fc64099b2795e7c23b9d211
dmaengine: xilinx_dma: Fix race condition in the driver for multiple descriptor scenario

As per axi dmaengine spec the software must not move the tail pointer
to a location that has not been updated (next descriptor field of the
h/w descriptor should always point to a valid address).

When user submits multiple descriptors on the recv side, with the
current driver flow the last buffer descriptor next descriptor field
points to a invalid location, resulting the invalid data or errors from the
axidma dmaengine.

This patch fixes this issue by creating a buffer descritpor chain during
channel allocation itself and use those buffer descriptors for the
subsequent dma operations.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/xilinx/xilinx_dma.c