diff options
author | Lior Amsalem <alior@marvell.com> | 2015-05-26 15:07:32 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-06-10 18:48:30 +0200 |
commit | 9136291f1dbc1d4d1cacd2840fb35f4f3ce16c46 (patch) | |
tree | f4ed2951f43167da822efc5f1910f914988614e0 /drivers/dma/mv_xor.h | |
parent | dmaengine: pl330: fix wording in mcbufsz message (diff) | |
download | linux-9136291f1dbc1d4d1cacd2840fb35f4f3ce16c46.tar.xz linux-9136291f1dbc1d4d1cacd2840fb35f4f3ce16c46.zip |
dmaengine: mv_xor: bug fix for racing condition in descriptors cleanup
This patch fixes a bug in the XOR driver where the cleanup function can be
called and free descriptors that never been processed by the engine (which
result in data errors).
The cleanup function will free descriptors based on the ownership bit in
the descriptors.
Fixes: ff7b04796d98 ("dmaengine: DMA engine driver for Marvell XOR engine")
Signed-off-by: Lior Amsalem <alior@marvell.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Ofer Heifetz <oferh@marvell.com>
Cc: stable@vger.kernel.org
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/mv_xor.h')
-rw-r--r-- | drivers/dma/mv_xor.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/mv_xor.h b/drivers/dma/mv_xor.h index 91958dba39a2..0e302b3a33ad 100644 --- a/drivers/dma/mv_xor.h +++ b/drivers/dma/mv_xor.h @@ -31,6 +31,7 @@ #define XOR_OPERATION_MODE_XOR 0 #define XOR_OPERATION_MODE_MEMCPY 2 #define XOR_DESCRIPTOR_SWAP BIT(14) +#define XOR_DESC_SUCCESS 0x40000000 #define XOR_DESC_DMA_OWNED BIT(31) #define XOR_DESC_EOD_INT_EN BIT(31) |