dmaengine: xilinx: vdma: Allow only one chunk in a line
authorSrikanth Thokala <srikanth.thokala@xilinx.com>
Wed, 5 Nov 2014 18:37:01 +0000 (20:37 +0200)
committerVinod Koul <vinod.koul@intel.com>
Thu, 6 Nov 2014 07:41:47 +0000 (13:11 +0530)
This patch adds a sanity check to see if frame_size is 1.

Signed-off-by: Srikanth Thokala <sthokal@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/xilinx/xilinx_vdma.c

index 10937945a5272992b38a3e80bdbfe2a42d4938d5..3d3f70dd9deabea19ce947d03b8e62e83f89f6d3 100644 (file)
@@ -942,6 +942,9 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan,
        if (!xt->numf || !xt->sgl[0].size)
                return NULL;
 
+       if (xt->frame_size != 1)
+               return NULL;
+
        /* Allocate a transaction descriptor. */
        desc = xilinx_vdma_alloc_tx_descriptor(chan);
        if (!desc)