From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v6 3/5] serial: core: allow drivers to reserve flushed transmit storage
Date: Sat, 24 Oct 2026 21:22:28 +0000 [thread overview]
Message-ID: <sashiko-outbox-183882@kernel.org> (raw)
In-Reply-To: <20261024-submit-serial-8250-dma-cancel-v1-v6-3-6f366591f566@gmail.com>
> uart_flush_buffer() resets the transmit FIFO before calling the driver's
> flush callback. An asynchronous DMA transfer can still access that storage
> after the callback returns, while a new write can immediately reuse it.
>
> Add uart_xmit_block() and uart_xmit_unblock() so a driver can reserve the
> flushed storage until its transfer and completion callbacks have retired.
> Serialize the reservation with FIFO producers using the port lock.
>
> While the storage is reserved, write_room() reports no space and write()
> and put_char() accept no data. Defer write-ready notifications until the
> reservation is released, preserving one-shot TTY wakeups. Keep the flush
> wakeup under the port lock so it cannot race another reservation.
>
> Suppress ordinary TX starts while the FIFO storage is blocked. Preserve
> high-priority flow-control characters, which use separate storage.
> [ ... ]
> Publish resume readiness under the same port lock as the TX restart,
> without clearing any reservation. A concurrent flush can then reserve a
> new transfer without resume releasing its storage prematurely.
>
> 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/20261024-submit-serial-8250-dma-cancel-v1-v6-0-6f366591f566@gmail.com?part=3
next prev parent reply other threads:[~2026-10-24 21:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 20:52 [PATCH v6 0/5] serial: 8250: serialize DMA cancellation with buffer reuse James Hilliard
2026-10-24 20:52 ` [PATCH v6 1/5] serial: 8250_omap: separate locked TX DMA completion processing James Hilliard
2026-10-24 21:10 ` sashiko-bot
2026-10-24 20:52 ` [PATCH v6 2/5] serial: serialize asynchronous write wakeups with the port lock James Hilliard
2026-10-24 21:17 ` sashiko-bot
2026-10-25 15:14 ` Andy Shevchenko
2026-10-24 20:52 ` [PATCH v6 3/5] serial: core: allow drivers to reserve flushed transmit storage James Hilliard
2026-10-24 21:22 ` sashiko-bot [this message]
2026-10-24 20:52 ` [PATCH v6 4/5] serial: 8250: drain canceled TX DMA before reusing its buffer James Hilliard
2026-10-24 21:17 ` sashiko-bot
2026-10-24 20:52 ` [PATCH v6 5/5] serial: 8250: retire canceled RX DMA before reusing the receive buffer James Hilliard
2026-10-24 21:19 ` sashiko-bot
2026-10-26 11:15 ` [PATCH v6 0/5] serial: 8250: serialize DMA cancellation with buffer reuse Ilpo Järvinen
[not found] ` <CAHQZ30AfcwMTXPpCgiWkhz1OFoxHJOqcVmur8Buz72M45Acuag@mail.gmail.com>
2026-10-26 17:10 ` James Hilliard
2026-10-26 18:05 ` Ilpo Järvinen
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-183882@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox