]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: sh: setup_xref error handling
authorThomas Andreatta <thomasandreatta2000@gmail.com>
Wed, 27 Aug 2025 15:24:43 +0000 (17:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Dec 2025 11:45:11 +0000 (12:45 +0100)
commit7e81e14edd4f2fa00eb2cdd1fe1e86a660ac7ffe
tree80a374c27b4da872cb0754fa53654568d3180d3a
parented72c6385d1a9244effe33a53805e71c3a605f6f
dmaengine: sh: setup_xref error handling

[ Upstream commit d9a3e9929452780df16f3414f0d59b5f69d058cf ]

This patch modifies the type of setup_xref from void to int and handles
errors since the function can fail.

`setup_xref` now returns the (eventual) error from
`dmae_set_dmars`|`dmae_set_chcr`, while `shdma_tx_submit` handles the
result, removing the chunks from the queue and marking PM as idle in
case of an error.

Signed-off-by: Thomas Andreatta <thomas.andreatta2000@gmail.com>
Link: https://lore.kernel.org/r/20250827152442.90962-1-thomas.andreatta2000@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/sh/shdma-base.c
drivers/dma/sh/shdmac.c
include/linux/shdma-base.h