dmaengine: dmatest: Apply copy_align to DMA_SG as well
authorNicolin Chen <nicoleotsuka@gmail.com>
Thu, 8 Sep 2016 01:24:28 +0000 (18:24 -0700)
committerVinod Koul <vinod.koul@intel.com>
Fri, 9 Sep 2016 11:40:54 +0000 (17:10 +0530)
The DMA_SG is still a type of memory copy operation that should
conform the hardware restriction. So this patch just applies the
copy_align to DMA_SG as well.

Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dmatest.c

index 738fbd1..53e9728 100644 (file)
@@ -505,7 +505,7 @@ static int dmatest_func(void *data)
                total_tests++;
 
                /* honor alignment restrictions */
-               if (thread->type == DMA_MEMCPY)
+               if (thread->type == DMA_MEMCPY || thread->type == DMA_SG)
                        align = dev->copy_align;
                else if (thread->type == DMA_XOR)
                        align = dev->xor_align;