dmaengine: xilinx_dma: check for invalid vdma interleaved parameters
authorPeter Korsgaard <peter@korsgaard.com>
Fri, 5 Jan 2024 10:59:56 +0000 (11:59 +0100)
committerVinod Koul <vkoul@kernel.org>
Mon, 22 Jan 2024 11:30:12 +0000 (17:00 +0530)
commit8fcc3f7dbdaeff3c3be47a15d1acd7863dfee92d
tree461fd8388369dda357ef5698ba46fbbe75fed549
parent33b7db45533af240fe44e809f9dc4d604cf82d07
dmaengine: xilinx_dma: check for invalid vdma interleaved parameters

The VDMA HSIZE register (corresponding to sgl[0].size) is only 16bit wide /
the VSIZE register (corresponding to numf) is only 13bit wide, so reject
requests not fitting within that rather than silently transferring too
little data.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Link: https://lore.kernel.org/r/20240105105956.1370220-1-peter@korsgaard.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/xilinx_dma.c