* [PATCH] spi: ingenic: release tx DMA channel when rx request fails
@ 2026-09-03 17:17 Felix Gu
2026-09-04 17:11 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Felix Gu @ 2026-09-03 17:17 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-spi, linux-kernel, Felix Gu
When the rx channel request fails, the driver carries on without DMA
but the tx channel it already acquired stayed claimed until devm
teardown.
Release it on the error path so it goes straight back to the DMA
engine for other users.
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
drivers/spi/spi-ingenic.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-ingenic.c b/drivers/spi/spi-ingenic.c
index adcf85bccbcc..7ce4fe965cac 100644
--- a/drivers/spi/spi-ingenic.c
+++ b/drivers/spi/spi-ingenic.c
@@ -354,8 +354,11 @@ static int spi_ingenic_request_dma(struct spi_controller *ctlr,
ctlr->dma_tx = chan;
chan = dma_request_chan(dev, "rx");
- if (IS_ERR(chan))
+ if (IS_ERR(chan)) {
+ dma_release_channel(ctlr->dma_tx);
+ ctlr->dma_tx = NULL;
return PTR_ERR(chan);
+ }
ctlr->dma_rx = chan;
ctlr->can_dma = spi_ingenic_can_dma;
---
base-commit: 89c07d98716a13454ec3fd9f97689e812cc71bd4
change-id: 20260904-ingenic-856fb6004802
Best regards,
--
Felix Gu <ustc.gu@gmail.com>
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] spi: ingenic: release tx DMA channel when rx request fails
2026-09-03 17:17 [PATCH] spi: ingenic: release tx DMA channel when rx request fails Felix Gu
@ 2026-09-04 17:11 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2026-09-04 17:11 UTC (permalink / raw)
To: Felix Gu; +Cc: linux-spi, linux-kernel
On Fri, 04 Sep 2026 01:17:33 +0800, Felix Gu wrote:
> spi: ingenic: release tx DMA channel when rx request fails
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-7.4
Thanks!
[1/1] spi: ingenic: release tx DMA channel when rx request fails
https://git.kernel.org/broonie/spi/c/bb308b27016c
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-04 20:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-03 17:17 [PATCH] spi: ingenic: release tx DMA channel when rx request fails Felix Gu
2026-09-04 17:11 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®