dmaengine: fsl-dpaa2-qdma: Fix the size of dma pools
authorGuanhua Gao <guanhua.gao@nxp.com>
Thu, 18 Jan 2024 16:29:16 +0000 (11:29 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:10:42 +0000 (19:10 +0100)
commitf24ba6f9f7412ea277d816d46d028865f7f87332
tree8187d9d29072e5aa17716230c35f75998479d907
parentea42d6cffb0dd27a417f410b9d0011e9859328cb
dmaengine: fsl-dpaa2-qdma: Fix the size of dma pools

[ Upstream commit b73e43dcd7a8be26880ef8ff336053b29e79dbc5 ]

In case of long format of qDMA command descriptor, there are one frame
descriptor, three entries in the frame list and two data entries. So the
size of dma_pool_create for these three fields should be the same with
the total size of entries respectively, or the contents may be overwritten
by the next allocated descriptor.

Fixes: 7fdf9b05c73b ("dmaengine: fsl-dpaa2-qdma: Add NXP dpaa2 qDMA controller driver for Layerscape SoCs")
Signed-off-by: Guanhua Gao <guanhua.gao@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240118162917.2951450-1-Frank.Li@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c