All of lore.kernel.org
 help / color / mirror / Atom feed
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 v5 5/5] dmaengine: dw-axi-dmac: preserve pending pause requests
Date: Fri, 13 Nov 2026 09:56:39 +0000	[thread overview]
Message-ID: <sashiko-outbox-212590@kernel.org> (raw)
In-Reply-To: <20261113-submit-dw-axi-dma-stop-pause-v1-v5-5-8523a27b5788@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] dmaengine: dw-axi-dmac: cyclic completion in
  axi_chan_block_xfer_complete() bypasses suspend cleanup
--

commit d0a0ce5ca0c535aeb1aa58ba2ac57a8edf27e326
Author: James Hilliard <james.hilliard1@gmail.com>

dmaengine: dw-axi-dmac: preserve pending pause requests

This commit tracks pending pause requests and active descriptors across
polling timeouts, interrupt handling, and cyclic transfer completions so
that pause and resume operations do not lose hardware suspend
acknowledgments or prematurely restart transfers.

> 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..cd9a5b45d295a 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);
> +		}

[Severity: Medium]
Does setting chan->is_paused = true here bypass the suspend cleanup in
axi_chan_wait_for_suspend() when a cyclic segment completes after
dma_chan_pause() times out?

If dma_chan_pause() writes the channel suspend bit and times out with
-EAGAIN, and the cyclic segment then finishes in hardware before the
caller retries dma_chan_pause() or calls dma_chan_resume(), this branch
sets chan->is_paused = true without calling axi_chan_disable() or
clearing DWAXIDMAC_IRQ_SUSPENDED.  A subsequent dma_chan_pause() or
dma_chan_resume() will then hit the early return in
axi_chan_wait_for_suspend(), skipping axi_chan_is_suspended() (which
calls axi_chan_disable() for completed transfers) and leaving any late
DWAXIDMAC_IRQ_SUSPENDED status uncleared across pause retries.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261113-submit-dw-axi-dma-stop-pause-v1-v5-0-8523a27b5788@gmail.com?part=5

      reply	other threads:[~2026-11-13  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13  9:36 [PATCH v5 0/5] dmaengine: dw-axi-dmac: fix termination and pause acknowledgment James Hilliard
2026-11-13  9:36 ` [PATCH v5 1/5] dmaengine: dw-axi-dmac: keep cyclic mode in the descriptor James Hilliard
2026-11-13  9:36 ` [PATCH v5 2/5] dmaengine: dw-axi-dmac: poll the correct enable bit during termination James Hilliard
2026-11-13  9:36 ` [PATCH v5 3/5] dmaengine: dw-axi-dmac: retain descriptors when termination times out James Hilliard
2026-11-13  9:36 ` [PATCH v5 4/5] dmaengine: dw-axi-dmac: use atomic polling for suspend acknowledgment James Hilliard
2026-11-13  9:36 ` [PATCH v5 5/5] dmaengine: dw-axi-dmac: preserve pending pause requests James Hilliard
2026-11-13  9:56   ` sashiko-bot [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=sashiko-outbox-212590@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.