From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: dmaengine@vger.kernel.org, vkoul@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH v2 3/3] dmaengine: dw-axi-dmac: preserve pending pause requests
Date: Tue, 10 Nov 2026 03:25:27 +0000 [thread overview]
Message-ID: <sashiko-outbox-206114@kernel.org> (raw)
In-Reply-To: <20261109-submit-dw-axi-dma-stop-pause-v1-v2-3-64adc48df793@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dmaengine: dw-axi-dmac: cyclic completion skips suspend
cleanup on pause
--
commit 2085e97ef4b5e2caaf2c3443bb6eed8c9823633f
Author: James Hilliard <james.hilliard1@gmail.com>
dmaengine: dw-axi-dmac: preserve pending pause requests
This commit tracks pending DMA channel pause requests separately from
hardware suspend acknowledgment, prevents the shared IRQ handler from
clearing DWAXIDMAC_IRQ_SUSPENDED, and defers starting or restarting
transfers while a pause is pending.
> diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> index 281d7c79246e3..5c1eb120a28b1 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
[ ... ]
> @@ -1135,12 +1146,19 @@ static void axi_chan_block_xfer_complete(struct axi_dma_chan *chan)
> }
> }
>
> - axi_chan_enable(chan);
> + if (chan->pause_requested) {
> + chan->is_paused = true;
> + chan->cyclic_restart = true;
> + } else {
> + axi_chan_enable(chan);
> + }
> }
> } else {
[Severity: Medium]
Can setting chan->is_paused = true here leave an unacknowledged hardware
suspend request latched across dma_chan_resume()?
If dma_chan_pause() asserts the hardware suspend bit and times out waiting
for acknowledgment, and the active cyclic block finishes in hardware before
the caller retries pause or calls dma_chan_resume(), hardware clears the
channel enable bit without necessarily setting DWAXIDMAC_IRQ_SUSPENDED.
axi_chan_block_xfer_complete() then sets chan->is_paused = true without
calling axi_chan_disable(chan) or clearing DWAXIDMAC_IRQ_SUSPENDED.
When dma_chan_resume() later calls axi_chan_wait_for_suspend(), it sees
chan->is_paused == true and returns 0 immediately, skipping
axi_chan_is_suspended() (which calls axi_chan_disable(chan) to abort an
unacknowledged suspend on a completed transfer) and skipping
axi_chan_irq_clear(chan, DWAXIDMAC_IRQ_SUSPENDED). Because hardware
ignores clearing the suspend bit in axi_chan_resume() while an
unacknowledged request is still pending, re-enabling the channel for
chan->cyclic_restart can leave the suspend request active in hardware.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261109-submit-dw-axi-dma-stop-pause-v1-v2-0-64adc48df793@gmail.com?part=3
next prev parent reply other threads:[~2026-11-10 3:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 3:05 [PATCH v2 0/3] dmaengine: dw-axi-dmac: fix termination and pause acknowledgment James Hilliard
2026-11-10 3:06 ` [PATCH v2 1/3] dmaengine: dw-axi-dmac: poll the correct enable bit during termination James Hilliard
2026-11-10 7:38 ` Andy Shevchenko
2026-11-10 3:06 ` [PATCH v2 2/3] dmaengine: dw-axi-dmac: retain descriptors when termination times out James Hilliard
2026-11-10 7:40 ` Andy Shevchenko
2026-11-10 3:06 ` [PATCH v2 3/3] dmaengine: dw-axi-dmac: preserve pending pause requests James Hilliard
2026-11-10 3:25 ` sashiko-bot [this message]
2026-11-10 7:46 ` Andy Shevchenko
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=sashiko-outbox-206114@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=james.hilliard1@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--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