浏览代码

dmaengine: xilinx: vdma: Allow only one chunk in a line

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>
Srikanth Thokala 10 年之前
父节点
当前提交
a5e48e243b
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/dma/xilinx/xilinx_vdma.c

+ 3 - 0
drivers/dma/xilinx/xilinx_vdma.c

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