DMA Engine development
 help / color / mirror / Atom feed
From: Linus Walleij <linusw@kernel.org>
To: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>
Cc: dmaengine@vger.kernel.org, phone-devel@vger.kernel.org,
	 Linus Walleij <linusw@kernel.org>,
	sashiko-bot@kernel.org
Subject: [PATCH v3 00/22] dmaengine: ste_dma40: Fix numerous accumulated bugs
Date: Fri, 18 Sep 2026 18:24:19 +0200	[thread overview]
Message-ID: <20260918-dma40-fixes-v3-0-8dd8450669e8@kernel.org> (raw)

This series fixes 24 DMA40 bugs.

12 were found while reviewing the Ux500 LCLA SRAM power-domain conversion.

The cyclic transfer residue bug was exposed by Ux500 audio playback.

11 more issues were identified during review.

The method taken is: whenever Sashiko complains: fix the bug it complains
about if possible.

This has been boot tested on the Samsung Skomer device: DMA for MMC, wireless
SDIO and UART still works after these patches, and DMA for audio started
working.

Assisted-by: LLM
Signed-off-by: Linus Walleij <linusw@kernel.org>
---
Changes in v3:
- Add a fix so physical channels advertise their existing cyclic support.
- Add a cyclic-transfer residue fix so DMAengine PCM reports the correct
  hardware pointer and Ux500 audio playback does not stop with -EIO.
- In patch 3, preserve cookie completion order when the next queued
  transfer fails to start and retire failed cyclic descriptors.
- In patch 4, enable runtime PM before requesting the IRQ so pending
  interrupts can be acknowledged during probe.
- In patch 5, keep valid interrupt handling with CONFIG_PM disabled and
  only drop a runtime PM reference when one was acquired.
- Add checked runtime PM resume handling to channel operations.
- Add an IRQ status patch returning IRQ_NONE when no DMA40 interrupt was
  acknowledged.
- In patch 8, keep the IRQ disabled until hardware initialization has
  configured and cleared the DMA40 interrupt state.
- In the DMA registration unwind patch, free the IRQ before unregistering
  the DMA devices and drain initialized tasklets before releasing storage.
- Add a fix releasing the LCPA SRAM node reference after reading it.
- Move the disabled-channels binding restoration to its own series.
- Store memcpy channel mappings per controller and check the property read.
- Add validation for disabled physical channel indexes.
- Reject DMA specifiers that do not contain exactly three cells.
- Reject transfer direction changes after channel allocation so logical
  channel resource masks are released correctly.
- In the event-group bounds patch, use variant-specific limits so DB8540
  event group 4 remains available.
- Add fixed-channel fixes that search later physical blocks and validate
  configured physical channel indexes.
- Move the generic DMAengine debugfs naming fix to its own series.
- Use `Assisted-by: LLM` for the existing assistance trailers.
- Rebase onto v7.3-rc1.
- Link to v2: https://lore.kernel.org/r/20260820-dma40-fixes-v2-0-63238334c707@kernel.org

Changes in v2:
- In patch 1, complete the failed-start descriptor through the normal
  tasklet path and drop the runtime PM reference instead of freeing the
  submitted descriptor directly.
- Add an IRQ fix to avoid register access when DMA40 is runtime suspended.
- Add a probe ordering fix so DMA40 hardware is initialized before
  DMAengine devices are registered.
- Add a probe unwind fix so DMAengine registrations are released before
  freeing IRQ and LCLA resources.
- Add an LCLA allocation fix so __get_free_pages() and free_pages() use an
  allocation order instead of a raw page count.
- Add a probe unwind fix so ESRAM LCLA mappings are not released with
  free_pages().
- Add a device tree parsing fix so memcpy-channels cannot overflow the
  memcpy channel array.
- Add a dev_type bounds fix so derived event groups cannot overflow
  phy_res or the priority/realtime register window.
- Add validation for fallback memcpy configurations so memcpy-channels
  entries cannot bypass the dev_type bounds checks.
- Add a DMAengine debugfs naming fix so drivers registering several
  DMAengine devices for one parent device do not trigger duplicate-name
  warnings.
- Link to v1: https://lore.kernel.org/r/20260820-dma40-fixes-v1-0-5e14815ad689@kernel.org

---
Linus Walleij (22):
      dmaengine: ste_dma40: Fix physical cyclic capability
      dmaengine: ste_dma40: Fix cyclic transfer residue
      dmaengine: ste_dma40: Fix failed start cleanup
      dmaengine: ste_dma40: Fix probe runtime PM disable
      dmaengine: ste_dma40: Check runtime PM in IRQ
      dmaengine: ste_dma40: Handle runtime PM resume errors
      dmaengine: ste_dma40: Return IRQ_NONE without interrupt status
      dmaengine: ste_dma40: Init hardware before registration
      dmaengine: ste_dma40: Fix probe IRQ leak
      dmaengine: ste_dma40: Fix DMA registration unwind
      dmaengine: ste_dma40: Fix LCLA allocation order
      dmaengine: ste_dma40: Fix probe LCLA free
      dmaengine: ste_dma40: Put the LCPA SRAM node
      dmaengine: ste_dma40: Fix memcpy channel parsing
      dmaengine: ste_dma40: Validate disabled channel indexes
      dmaengine: ste_dma40: Validate DMA specifier length
      dmaengine: ste_dma40: Reject direction changes after allocation
      dmaengine: ste_dma40: Fix logical channel bounds check
      dmaengine: ste_dma40: Fix event group bounds
      dmaengine: ste_dma40: Search all blocks for fixed logical channels
      dmaengine: ste_dma40: Validate fixed physical channel indexes
      dmaengine: ste_dma40: Validate memcpy configuration

 drivers/dma/ste_dma40.c | 387 ++++++++++++++++++++++++++++++++++--------------
 1 file changed, 277 insertions(+), 110 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260820-dma40-fixes-b99af66002bf

Best regards,
-- 
Linus Walleij <linusw@kernel.org>


             reply	other threads:[~2026-09-18 16:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 16:24 Linus Walleij [this message]
2026-09-18 16:24 ` [PATCH v3 01/22] dmaengine: ste_dma40: Fix physical cyclic capability Linus Walleij
2026-09-18 19:57   ` Frank Li
2026-09-18 16:24 ` [PATCH v3 02/22] dmaengine: ste_dma40: Fix cyclic transfer residue Linus Walleij
2026-09-18 16:44   ` sashiko-bot
2026-09-18 21:41   ` Frank Li
2026-09-18 16:24 ` [PATCH v3 03/22] dmaengine: ste_dma40: Fix failed start cleanup Linus Walleij
2026-09-18 16:24 ` [PATCH v3 04/22] dmaengine: ste_dma40: Fix probe runtime PM disable Linus Walleij
2026-09-18 16:24 ` [PATCH v3 05/22] dmaengine: ste_dma40: Check runtime PM in IRQ Linus Walleij
2026-09-18 16:24 ` [PATCH v3 06/22] dmaengine: ste_dma40: Handle runtime PM resume errors Linus Walleij
2026-09-18 16:37   ` sashiko-bot
2026-09-18 16:24 ` [PATCH v3 07/22] dmaengine: ste_dma40: Return IRQ_NONE without interrupt status Linus Walleij
2026-09-18 16:24 ` [PATCH v3 08/22] dmaengine: ste_dma40: Init hardware before registration Linus Walleij
2026-09-18 16:24 ` [PATCH v3 09/22] dmaengine: ste_dma40: Fix probe IRQ leak Linus Walleij
2026-09-18 16:24 ` [PATCH v3 10/22] dmaengine: ste_dma40: Fix DMA registration unwind Linus Walleij
2026-09-18 16:24 ` [PATCH v3 11/22] dmaengine: ste_dma40: Fix LCLA allocation order Linus Walleij
2026-09-18 16:24 ` [PATCH v3 12/22] dmaengine: ste_dma40: Fix probe LCLA free Linus Walleij
2026-09-18 16:24 ` [PATCH v3 13/22] dmaengine: ste_dma40: Put the LCPA SRAM node Linus Walleij
2026-09-18 16:24 ` [PATCH v3 14/22] dmaengine: ste_dma40: Fix memcpy channel parsing Linus Walleij
2026-09-18 16:24 ` [PATCH v3 15/22] dmaengine: ste_dma40: Validate disabled channel indexes Linus Walleij
2026-09-18 16:24 ` [PATCH v3 16/22] dmaengine: ste_dma40: Validate DMA specifier length Linus Walleij
2026-09-18 16:24 ` [PATCH v3 17/22] dmaengine: ste_dma40: Reject direction changes after allocation Linus Walleij
2026-09-18 16:24 ` [PATCH v3 18/22] dmaengine: ste_dma40: Fix logical channel bounds check Linus Walleij
2026-09-18 16:24 ` [PATCH v3 19/22] dmaengine: ste_dma40: Fix event group bounds Linus Walleij
2026-09-18 16:24 ` [PATCH v3 20/22] dmaengine: ste_dma40: Search all blocks for fixed logical channels Linus Walleij
2026-09-18 16:24 ` [PATCH v3 21/22] dmaengine: ste_dma40: Validate fixed physical channel indexes Linus Walleij
2026-09-18 16:24 ` [PATCH v3 22/22] dmaengine: ste_dma40: Validate memcpy configuration Linus Walleij

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=20260918-dma40-fixes-v3-0-8dd8450669e8@kernel.org \
    --to=linusw@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=sashiko-bot@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