]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commit
dmaengine: xilinx_dma: Fix race condition in the driver for multiple descriptor scenario
authorKedareswara rao Appana <appana.durga.rao@xilinx.com>
Sat, 21 Jan 2017 06:02:08 +0000 (11:32 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 24 Jan 2017 15:40:05 +0000 (16:40 +0100)
commit98ca1d2bbd9408666b03b6edf88d560ea3794829
tree13f690feacf674a152c2dd03bad14ca0f6081625
parent4f143cb03aba0d74bf56552581be56a7405ce73d
dmaengine: xilinx_dma: Fix race condition in the driver for multiple descriptor scenario

As per AXI DMA 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 in the
DMA engine.

This patch fixes this issue by creating a Buffer Descritpor Chain during
Channel allocation itself and use those Buffer Descriptors.

Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/dma/xilinx/xilinx_dma.c