All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v5 02/10] dmaengine: dw: serialize error recovery with channel termination
Date: Mon, 02 Nov 2026 19:39:05 +0000	[thread overview]
Message-ID: <sashiko-outbox-194014@kernel.org> (raw)
In-Reply-To: <20261102-submit-dw-dma-synchronize-v1-v5-2-d3207758fbf9@gmail.com>

> The tasklet samples RAW.ERROR before taking the channel lock. A
> concurrent termination can empty the active list before dwc_handle_error()
> uses that cached error to select a descriptor. The list head is then
> interpreted as a descriptor. Even with an active descriptor, moving
> queue.next unconditionally can put an empty queue's head on the active
> list and pass it to dwc_dostart().
> 
> Recheck the error status under the channel lock and stop the channel
> before selecting its failed descriptor. Only one transaction is issued
> at a time, so take that descriptor directly instead of scanning for
> completions first. The scan can otherwise complete it and start queued
> work before the error handler has identified the failed transaction.
> 
> Detach the failed descriptor under the same lock and use the queued-start
> helper, which leaves an empty queue alone. Clear the software-LLP flag
> before restarting so a failed multiblock transfer does not prevent the
> next transaction from starting. Keep the completion callback outside the
> lock, with the detached descriptor owned by the tasklet.
> 
> Fixes: 3bfb1d20b547 ("dmaengine: Driver for the Synopsys DesignWare DMA controller")
> Fixes: f336e42f73d9 ("dw_dmac: Move single descriptor from dwc->queue to dwc->active_list in dwc_complete_all")
> Cc: stable@vger.kernel.org
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261102-submit-dw-dma-synchronize-v1-v5-0-d3207758fbf9@gmail.com?part=2


  reply	other threads:[~2026-11-02 19:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 19:34 [PATCH v5 00/10] dmaengine: dw: serialize completion and termination James Hilliard
2026-11-02 19:34 ` [PATCH v5 01/10] dmaengine: dw: Fix XFER bit set, but channel not idle error James Hilliard
2026-11-02 19:46   ` sashiko-bot
2026-11-02 19:34 ` [PATCH v5 02/10] dmaengine: dw: serialize error recovery with channel termination James Hilliard
2026-11-02 19:39   ` sashiko-bot [this message]
2026-11-02 19:34 ` [PATCH v5 03/10] dmaengine: dw: complete cookies before releasing the channel lock James Hilliard
2026-11-02 19:38   ` sashiko-bot
2026-11-02 19:34 ` [PATCH v5 04/10] dmaengine: dw: extract hardware-LLP residue calculation James Hilliard
2026-11-02 19:38   ` sashiko-bot
2026-11-02 19:34 ` [PATCH v5 05/10] dmaengine: dw: calculate residue in the status getter James Hilliard
2026-11-02 19:44   ` sashiko-bot
2026-11-02 21:10   ` Frank Li
2026-11-02 19:34 ` [PATCH v5 06/10] dmaengine: dw: simplify transfer-complete handling James Hilliard
2026-11-02 19:38   ` sashiko-bot
2026-11-02 19:34 ` [PATCH v5 07/10] dmaengine: dw: report residue for queued transfers James Hilliard
2026-11-02 19:38   ` sashiko-bot
2026-11-02 19:34 ` [PATCH v5 08/10] dmaengine: dw: drain the tasklet before releasing channel resources James Hilliard
2026-11-02 19:51   ` sashiko-bot
2026-11-02 19:34 ` [PATCH v5 09/10] dmaengine: dw: synchronize completion callbacks James Hilliard
2026-11-02 19:49   ` sashiko-bot
2026-11-02 19:34 ` [PATCH v5 10/10] dmaengine: dw: Prevent tx-status calling DMA-desc callback James Hilliard
2026-11-02 19:47   ` sashiko-bot

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-194014@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=james.hilliard1@gmail.com \
    --cc=linux-serial@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.