* [PATCH] dmaengine: tegra: only advertise supported pause operations
@ 2026-11-09 5:00 James Hilliard
2026-11-09 5:09 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: James Hilliard @ 2026-11-09 5:00 UTC (permalink / raw)
To: Laxman Dewangan, Jon Hunter, Vinod Koul, Frank Li, Thierry Reding,
Pavan Kunapuli, Dmitry Osipenko
Cc: Rajesh Gumasta, Thierry Reding, Akhil R, dmaengine, linux-tegra,
linux-kernel, stable, James Hilliard
Tegra186 does not support pausing a channel, but the driver installs
device_pause and device_resume for every variant. Both callbacks return
-ENOSYS on Tegra186.
dma_get_slave_caps() derives cmd_pause and cmd_resume from the presence
of these callbacks. Clients such as generic 8250 therefore accept RX DMA
channels that cannot satisfy their pause requirement. A receive timeout
then reaches an unsupported pause operation instead of being excluded
when the channel capabilities are checked.
Only install the pause and resume callbacks when the matched chip data
advertises hardware support. Keep them available on Tegra194 and later.
Fixes: ee17028009d4 ("dmaengine: tegra: Add tegra gpcdma driver")
Cc: stable@vger.kernel.org
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
drivers/dma/tegra186-gpc-dma.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/tegra186-gpc-dma.c b/drivers/dma/tegra186-gpc-dma.c
index e76c58f213d8..72266f490e8a 100644
--- a/drivers/dma/tegra186-gpc-dma.c
+++ b/drivers/dma/tegra186-gpc-dma.c
@@ -1518,8 +1518,10 @@ static int tegra_dma_probe(struct platform_device *pdev)
tdma->dma_dev.device_terminate_all = tegra_dma_terminate_all;
tdma->dma_dev.device_tx_status = tegra_dma_tx_status;
tdma->dma_dev.device_issue_pending = tegra_dma_issue_pending;
- tdma->dma_dev.device_pause = tegra_dma_device_pause;
- tdma->dma_dev.device_resume = tegra_dma_device_resume;
+ if (cdata->hw_support_pause) {
+ tdma->dma_dev.device_pause = tegra_dma_device_pause;
+ tdma->dma_dev.device_resume = tegra_dma_device_resume;
+ }
tdma->dma_dev.device_synchronize = tegra_dma_chan_synchronize;
tdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261108-submit-tegra186-dma-pause-caps-v1-664d1320d502
Best regards,
--
James Hilliard <james.hilliard1@gmail.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] dmaengine: tegra: only advertise supported pause operations
2026-11-09 5:00 [PATCH] dmaengine: tegra: only advertise supported pause operations James Hilliard
@ 2026-11-09 5:09 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-09 5:09 UTC (permalink / raw)
To: James Hilliard; +Cc: dmaengine, vkoul, Frank.Li
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dmaengine: tegra: redundant pause checks in
tegra_dma_device_pause()
--
commit 3ce960c2c1d14548e97fac4df9585c921b1d04e0
Author: James Hilliard <james.hilliard1@gmail.com>
dmaengine: tegra: only advertise supported pause operations
This commit registers the device_pause and device_resume callbacks in
tegra_dma_probe() only when cdata->hw_support_pause is set, preventing SoCs
such as Tegra186 from advertising unsupported pause capabilities.
> diff --git a/drivers/dma/tegra186-gpc-dma.c b/drivers/dma/tegra186-gpc-dma.c
> index e76c58f213d84..72266f490e8a3 100644
> --- a/drivers/dma/tegra186-gpc-dma.c
> +++ b/drivers/dma/tegra186-gpc-dma.c
> @@ -1518,8 +1518,10 @@ static int tegra_dma_probe(struct platform_device *pdev)
> tdma->dma_dev.device_terminate_all = tegra_dma_terminate_all;
> tdma->dma_dev.device_tx_status = tegra_dma_tx_status;
> tdma->dma_dev.device_issue_pending = tegra_dma_issue_pending;
> - tdma->dma_dev.device_pause = tegra_dma_device_pause;
> - tdma->dma_dev.device_resume = tegra_dma_device_resume;
> + if (cdata->hw_support_pause) {
> + tdma->dma_dev.device_pause = tegra_dma_device_pause;
> + tdma->dma_dev.device_resume = tegra_dma_device_resume;
> + }
[Severity: Low]
Can the !tdc->tdma->chip_data->hw_support_pause checks in
tegra_dma_device_pause() and tegra_dma_device_resume() be dropped now that
both callbacks are only registered when cdata->hw_support_pause is true?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261108-submit-tegra186-dma-pause-caps-v1-v1-1-9cc9b17a033d@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-09 5:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 5:00 [PATCH] dmaengine: tegra: only advertise supported pause operations James Hilliard
2026-11-09 5:09 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox