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 v4 5/5] dmaengine: dw-axi-dmac: preserve pending pause requests
Date: Thu, 12 Nov 2026 09:23:28 +0000 [thread overview]
Message-ID: <sashiko-outbox-210870@kernel.org> (raw)
In-Reply-To: <20261112-submit-dw-axi-dma-stop-pause-v1-v4-5-3ebc24b243db@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dmaengine: dw-axi-dmac: cyclic completion bypasses suspend
cleanup
--
commit 42cf728bc72837bdd6aafccd6828bd4c191d4963
Author: James Hilliard <james.hilliard1@gmail.com>
dmaengine: dw-axi-dmac: preserve pending pause requests
This commit tracks pending pause requests separately from hardware suspend
acknowledgment and defers restarting cyclic or queued descriptors while a
pause is requested.
> 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 1a53fbc951a91..70ff0c5006231 100644
> --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
[ ... ]
> @@ -1134,11 +1145,18 @@ 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]
Does setting chan->is_paused here skip cleaning up an unacknowledged
hardware suspend request when a cyclic block completes after
dma_chan_pause() times out?
If dma_chan_pause() writes the channel suspend request and times out in
axi_chan_wait_for_suspend(), chan->pause_requested remains true while the
hardware suspend request stays pending. When the in-flight cyclic block
then finishes, axi_chan_block_xfer_complete() sets chan->is_paused = true
without calling axi_chan_disable() or clearing DWAXIDMAC_IRQ_SUSPENDED. A
later dma_chan_pause() retry or dma_chan_resume() call sees chan->is_paused
and returns early from axi_chan_wait_for_suspend(), bypassing the
axi_chan_disable() call in axi_chan_is_suspended() that clears an
unacknowledged suspend request on a completed transfer.
Leaving chan->is_paused false here (or calling axi_chan_disable() and
clearing DWAXIDMAC_IRQ_SUSPENDED before setting chan->is_paused) would
ensure the pending hardware suspend state is cleaned up before the channel
is re-enabled on resume.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112-submit-dw-axi-dma-stop-pause-v1-v4-0-3ebc24b243db@gmail.com?part=5
next prev parent reply other threads:[~2026-11-12 9:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 8:22 [PATCH v4 0/5] dmaengine: dw-axi-dmac: fix termination and pause acknowledgment James Hilliard
2026-11-12 8:22 ` [PATCH v4 1/5] dmaengine: dw-axi-dmac: keep cyclic mode in the descriptor James Hilliard
2026-11-12 8:22 ` [PATCH v4 2/5] dmaengine: dw-axi-dmac: poll the correct enable bit during termination James Hilliard
2026-11-12 8:22 ` [PATCH v4 3/5] dmaengine: dw-axi-dmac: retain descriptors when termination times out James Hilliard
2026-11-12 8:22 ` [PATCH v4 4/5] dmaengine: dw-axi-dmac: use atomic polling for suspend acknowledgment James Hilliard
2026-11-12 8:22 ` [PATCH v4 5/5] dmaengine: dw-axi-dmac: preserve pending pause requests James Hilliard
2026-11-12 9:23 ` sashiko-bot [this message]
2026-11-12 15:53 ` 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-210870@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.