mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amelie Delaunay <amelie.delaunay@foss.st.com>
To: "Vinod Koul" <vkoul@kernel.org>, "Frank Li" <Frank.Li@kernel.org>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
	"Amélie Delaunay" <amelie.delaunay@foss.st.com>
Cc: <dmaengine@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, Jerome Audu <jerome.audu@st.com>,
	<stable@vger.kernel.org>, Frank Li <Frank.Li@nxp.com>
Subject: [PATCH v2 0/4] dmaengine: stm32-dma3: fix IRQ flag race and linked-list handling
Date: Mon, 23 Nov 2026 10:17:04 +0100	[thread overview]
Message-ID: <20261123-dma3-fixes-v2-0-0a5b013f79d2@foss.st.com> (raw)

This series fixes issues in the STM32 DMA3 driver around transfer
completion and linked-list (LL) handling, plus a related cleanup.

- Patch 1: clear channel flags before handling completion, so the
  Transfer Complete flag of a new transfer started from the completion
  path is no longer cleared, which could lead to a timeout.
- Patch 2: write the LL base address (CxLBAR) when starting a transfer
  rather than at allocation, as other transfers prepared in between could
  change it.
- Patch 3: reject linked lists spanning several 64 KiB windows, since
  CLBAR provides the common upper address bits. Lists may now fail to be
  prepared when crossing a 64KiB boundary, which is preferable to
  the hardware fetching descriptors from the wrong addresses.
- Patch 4: cleanup, derive the descriptor size from the structure and
  correct the maximum descriptor count to (CLLR_LA / size) + 1.

Patches 1 to 3 fix issues present since the driver was introduced and
are marked for stable.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
---
Changes in v2:
- Address Frank Li's feedback: rewrite Patch 1 description more clearly
  and add a blank line to separate paragraph in Patch 2 description.
- Link to v1: https://patch.msgid.link/20261120-dma3-fixes-v1-0-f29c1f437399@foss.st.com

---
Amelie Delaunay (3):
      dmaengine: stm32-dma3: set LL base address when transfer starts
      dmaengine: stm32-dma3: validate LLI pool allocations and fix cleanup
      dmaengine: stm32-dma3: replace hardcoded LLI size with aligned descriptor size

Jerome Audu (1):
      dmaengine: stm32-dma3: clear flags before signaling transfer completion

 drivers/dma/stm32/stm32-dma3.c | 78 ++++++++++++++++++++++++++----------------
 1 file changed, 49 insertions(+), 29 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261119-dma3-fixes-d6c3ee1dada0

Best regards,
--  
Amelie Delaunay <amelie.delaunay@foss.st.com>


             reply	other threads:[~2026-11-23  9:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  9:17 Amelie Delaunay [this message]
2026-11-23  9:17 ` [PATCH v2 1/4] dmaengine: stm32-dma3: clear flags before signaling transfer completion Amelie Delaunay
2026-11-23  9:17 ` [PATCH v2 2/4] dmaengine: stm32-dma3: set LL base address when transfer starts Amelie Delaunay
2026-11-23  9:17 ` [PATCH v2 3/4] dmaengine: stm32-dma3: validate LLI pool allocations and fix cleanup Amelie Delaunay
2026-11-23  9:17 ` [PATCH v2 4/4] dmaengine: stm32-dma3: replace hardcoded LLI size with aligned descriptor size Amelie Delaunay

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=20261123-dma3-fixes-v2-0-0a5b013f79d2@foss.st.com \
    --to=amelie.delaunay@foss.st.com \
    --cc=Frank.Li@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jerome.audu@st.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@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®