DMA Engine development
 help / color / mirror / Atom feed
From: Rui Wang <wr574332525@163.com>
To: frank.li@oss.nxp.com
Cc: vkoul@kernel.org, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] dmaengine: dw-axi-dmac: report paused state and residue in tx_status
Date: Mon, 28 Sep 2026 11:51:21 +0800	[thread overview]
Message-ID: <20260928035121.2033-1-wr574332525@163.com> (raw)
In-Reply-To: <arVuKmKc8XE46R9B@SMW015318>

Hi Frank,

On Thu, Sep 24, 2026 at 01:38:34PM -0500, Frank Li wrote:
> Look like possible. Caller may reuse prevous DMA buffer. But I don't know
> how to resolve it.

How about pre-loading the pointer registers when programming the
channel? In v6, axi_chan_block_xfer_start() writes the first block's
SAR/DAR into CH_SAR/CH_DAR before setting the channel enable bit. The
hardware reloads them with the same values once it fetches the first
LLI, and in the window in between a reader observes the start of the
first block, i.e. a full residue, which is the truth for a transfer
that has not begun. A stale end-of-transfer pointer left by a previous
run can no longer be observed, so the buffer-reuse race is closed at
the source and tx_status stays free of special cases.

Best regards,
Rui Wang


      reply	other threads:[~2026-09-28  3:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24  2:57 [PATCH v5] dmaengine: dw-axi-dmac: report paused state and residue in tx_status Rui Wang
2026-09-24  3:18 ` sashiko-bot
2026-09-24 18:38   ` Frank Li
2026-09-28  3:51     ` Rui Wang [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=20260928035121.2033-1-wr574332525@163.com \
    --to=wr574332525@163.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=frank.li@oss.nxp.com \
    --cc=linux-kernel@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