mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: James Hilliard <james.hilliard1@gmail.com>
Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
	Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
	Sergey Khimich <serghox@gmail.com>,
	Sia Jee Heng <jee.heng.sia@intel.com>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v3 4/4] dmaengine: dw-axi-dmac: preserve pending pause requests
Date: Wed, 11 Nov 2026 16:36:09 +0200	[thread overview]
Message-ID: <avR9WSbaBlNtNUjn@ashevche-desk.local> (raw)
In-Reply-To: <20261110-submit-dw-axi-dma-stop-pause-v1-v3-4-35fdfba8b61d@gmail.com>

On Tue, Nov 10, 2026 at 08:15:15PM -0700, James Hilliard wrote:
> dma_chan_pause() clears SUSPENDED even when polling times out. Hardware
> can set that status after the last poll, and the unconditional clear then
> discards an acknowledgment the caller never observed. Another channel's
> interrupt can also consume the status because the shared IRQ handler
> clears every channel's status before taking its lock.
> 
> Leave SUSPENDED to the pause and resume paths. Track the suspend request
> separately from its acknowledgment so a timeout can be followed by either
> a pause retry or a resume. Wait for acknowledgment before clearing the
> hardware request, since hardware ignores an earlier clear. If that wait
> also times out, return -EAGAIN with the request still pending.
> 
> A completed transfer is also quiescent, but its completion handler may
> still need to advance a cyclic descriptor. Defer that restart while a
> pause is pending, and resume it without reprogramming the first LLI.
> Track the active descriptor until its completion handler runs so that
> resume and issue_pending cannot restart a completed cyclic segment or
> reissue a completed noncyclic descriptor while its IRQ is pending.
> Start queued work after the active descriptor is retired, respecting the
> pause request.
> 
> Clear stale suspension status at the start of a new descriptor rather
> than at each cyclic restart. Reset the software state after successful
> termination and when allocating a channel for a new client.
> 
> Store the lock-protected pause flags as bitfields in existing padding,
> keeping cyclic in a separate byte because it is set outside vc.lock.

...

> +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac.h
> @@ -42,6 +42,12 @@ struct axi_dma_chan {
>  	void __iomem			*chan_regs;
>  	u8				id;
>  	u8				hw_handshake_num;

> +	bool				cyclic;

> -	bool				cyclic;

This move doesn't belong to this patch. Yes, I understand that `pahole`
suggested better layout, but make it in a separate patch.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-11-11 14:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  3:15 [PATCH v3 0/4] dmaengine: dw-axi-dmac: fix termination and pause acknowledgment James Hilliard
2026-11-11  3:15 ` [PATCH v3 1/4] dmaengine: dw-axi-dmac: poll the correct enable bit during termination James Hilliard
2026-11-11  3:15 ` [PATCH v3 2/4] dmaengine: dw-axi-dmac: retain descriptors when termination times out James Hilliard
2026-11-11  3:15 ` [PATCH v3 3/4] dmaengine: dw-axi-dmac: use atomic polling for suspend acknowledgment James Hilliard
2026-11-11  3:15 ` [PATCH v3 4/4] dmaengine: dw-axi-dmac: preserve pending pause requests James Hilliard
2026-11-11 14:36   ` Andy Shevchenko [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=avR9WSbaBlNtNUjn@ashevche-desk.local \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=james.hilliard1@gmail.com \
    --cc=jee.heng.sia@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serghox@gmail.com \
    --cc=stable@vger.kernel.org \
    --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®