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 v12 7/8] serial: 8250: retire canceled RX DMA before reusing the receive buffer
Date: Thu, 12 Nov 2026 01:50:11 +0000	[thread overview]
Message-ID: <sashiko-outbox-210099@kernel.org> (raw)
In-Reply-To: <20261111-submit-serial-8250-dma-cancel-v1-v12-7-9e3456bc2555@gmail.com>

> The generic RX timeout path pauses a transfer, copies its data and
> terminates it asynchronously. Clearing rx_running at that point lets a
> new receive reuse the buffer and cookie while the old callback has not
> yet run. Inspecting the new cookie cannot distinguish that callback from
> the completion of a new transfer.
> 
> Reserve the receive buffer until a worker has drained the canceled
> callbacks. Keep FIFO access separate from callback retirement: after a
> successful pause and termination, clear rx_running while rx_terminating
> prevents another descriptor from reusing the buffer. Deliver the paused
> data before allowing the interrupt handler to drain the FIFO through PIO.
> Normal retirement only releases ownership and leaves subsequent receive
> handling to the UART interrupt.
> 
> Preserve the normal completion-path LSR read and gate DMA resubmission on
> [ ... ]
> Fixes: 9ee4b83e51f7 ("serial: 8250: Add support for dmaengine")
> Suggested-by: Raul E Rangel <rrangel@chromium.org>
> Link: https://lore.kernel.org/r/20261109162135.906262-1-rrangel@chromium.org/
> Reviewed-by: Raul E Rangel <rrangel@chromium.org>
> 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/20261111-submit-serial-8250-dma-cancel-v1-v12-0-9e3456bc2555@gmail.com?part=7


  reply	other threads:[~2026-11-12  1:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 22:16 [PATCH v12 0/8] serial: 8250: serialize DMA cancellation with buffer reuse James Hilliard
2026-11-11 22:16 ` [PATCH v12 1/8] serial: 8250_omap: separate locked TX DMA completion processing James Hilliard
2026-11-12  0:17   ` sashiko-bot
2026-11-11 22:16 ` [PATCH v12 2/8] serial: serialize asynchronous write wakeups with the port lock James Hilliard
2026-11-12  0:27   ` sashiko-bot
2026-11-12 16:11   ` Andy Shevchenko
2026-11-11 22:16 ` [PATCH v12 3/8] serial: 8250_omap: serialize RX DMA completion and flushing James Hilliard
2026-11-12  0:32   ` sashiko-bot
2026-11-11 22:16 ` [PATCH v12 4/8] serial: 8250_omap: quiesce DMA IRQ handling before shutdown James Hilliard
2026-11-12  0:44   ` sashiko-bot
2026-11-11 22:16 ` [PATCH v12 5/8] serial: core: allow drivers to reserve flushed transmit storage James Hilliard
2026-11-12  1:05   ` sashiko-bot
2026-11-12 16:13   ` Andy Shevchenko
2026-11-11 22:16 ` [PATCH v12 6/8] serial: 8250: drain canceled TX DMA before reusing its buffer James Hilliard
2026-11-12  1:19   ` sashiko-bot
2026-11-11 22:16 ` [PATCH v12 7/8] serial: 8250: retire canceled RX DMA before reusing the receive buffer James Hilliard
2026-11-12  1:50   ` sashiko-bot [this message]
2026-11-12 16:25   ` Andy Shevchenko
2026-11-11 22:16 ` [PATCH v12 8/8] serial: 8250: retain DMA resources when termination fails James Hilliard
2026-11-12  1:36   ` sashiko-bot
2026-11-12 16:28   ` Andy Shevchenko

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-210099@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.