From: Akhil R <akhilrajeev@nvidia.com>
To: <james.hilliard1@gmail.com>
Cc: <Frank.Li@kernel.org>, <akhilrajeev@nvidia.com>,
<digetx@gmail.com>, <dmaengine@vger.kernel.org>,
<jonathanh@nvidia.com>, <ldewangan@nvidia.com>,
<linux-kernel@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<pkunapuli@nvidia.com>, <rgumasta@nvidia.com>,
<stable@vger.kernel.org>, <thierry.reding@kernel.org>,
<treding@nvidia.com>, <vkoul@kernel.org>
Subject: [PATCH v2] dmaengine: tegra: only advertise supported pause operations
Date: Tue, 17 Nov 2026 06:41:42 +0000 [thread overview]
Message-ID: <20261117064143.4024726-1-akhilrajeev@nvidia.com> (raw)
In-Reply-To: <20261109-submit-tegra186-dma-pause-caps-v1-v2-1-accf568bf0cc@gmail.com>
On Mon, 09 Nov 2026 20:02:14 -0700, James Hilliard wrote:
> 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,
> and remove their now-redundant checks for unsupported hardware.
>
> Fixes: ee17028009d4 ("dmaengine: tegra: Add tegra gpcdma driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Reviewed-by: Akhil R <akhilrajeev@nvidia.com>
> ---
> Changes in v2:
> - Remove the capability checks from the pause and resume callbacks now that
> they are registered only on hardware that supports them.
> - Link to v1: https://patch.msgid.link/20261108-submit-tegra186-dma-pause-caps-v1-v1-1-9cc9b17a033d@gmail.com
>
> To: Laxman Dewangan <ldewangan@nvidia.com>
> To: Jon Hunter <jonathanh@nvidia.com>
> To: Vinod Koul <vkoul@kernel.org>
> To: Frank Li <Frank.Li@kernel.org>
> To: Thierry Reding <thierry.reding@kernel.org>
> To: Akhil R <akhilrajeev@nvidia.com>
> To: Pavan Kunapuli <pkunapuli@nvidia.com>
> To: Dmitry Osipenko <digetx@gmail.com>
> Cc: Thierry Reding <treding@nvidia.com>
> Cc: dmaengine@vger.kernel.org
> Cc: linux-tegra@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> ---
> drivers/dma/tegra186-gpc-dma.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/dma/tegra186-gpc-dma.c b/drivers/dma/tegra186-gpc-dma.c
> index e76c58f213d8..bd606b71e714 100644
> --- a/drivers/dma/tegra186-gpc-dma.c
> +++ b/drivers/dma/tegra186-gpc-dma.c
> @@ -419,9 +419,6 @@ static int tegra_dma_device_pause(struct dma_chan *dc)
> unsigned long flags;
> int ret;
>
> - if (!tdc->tdma->chip_data->hw_support_pause)
> - return -ENOSYS;
> -
> spin_lock_irqsave(&tdc->vc.lock, flags);
> ret = tegra_dma_pause(tdc);
> spin_unlock_irqrestore(&tdc->vc.lock, flags);
> @@ -445,9 +442,6 @@ static int tegra_dma_device_resume(struct dma_chan *dc)
> struct tegra_dma_channel *tdc = to_tegra_dma_chan(dc);
> unsigned long flags;
>
> - if (!tdc->tdma->chip_data->hw_support_pause)
> - return -ENOSYS;
> -
> spin_lock_irqsave(&tdc->vc.lock, flags);
> tegra_dma_resume(tdc);
> spin_unlock_irqrestore(&tdc->vc.lock, flags);
> @@ -1518,8 +1512,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
Best Regards,
Akhil
prev parent reply other threads:[~2026-11-17 6:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 3:02 James Hilliard
2026-11-16 21:38 ` Frank Li
2026-11-17 6:41 ` Akhil R [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261117064143.4024726-1-akhilrajeev@nvidia.com \
--to=akhilrajeev@nvidia.com \
--cc=Frank.Li@kernel.org \
--cc=digetx@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=james.hilliard1@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=pkunapuli@nvidia.com \
--cc=rgumasta@nvidia.com \
--cc=stable@vger.kernel.org \
--cc=thierry.reding@kernel.org \
--cc=treding@nvidia.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®