From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH v10 5/8] serial: core: allow drivers to reserve flushed transmit storage
Date: Mon, 09 Nov 2026 04:07:07 +0000 [thread overview]
Message-ID: <sashiko-outbox-204395@kernel.org> (raw)
In-Reply-To: <20261108-submit-serial-8250-dma-cancel-v1-v10-5-e6227ddb95b1@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's
> write-ready notification under the port lock so it cannot race another
> reservation.
>
> Wake tty->write_wait after flushing even when writes remain blocked.
> [ ... ]
> Assert the port-lock requirement at uart_write_wakeup(), alongside the
> reservation helpers, so callers cannot inspect readiness or release a
> one-shot notification concurrently with a reservation change.
>
> 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/20261108-submit-serial-8250-dma-cancel-v1-v10-0-e6227ddb95b1@gmail.com?part=5
next prev parent reply other threads:[~2026-11-09 4:07 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 3:50 [PATCH v10 0/8] serial: 8250: serialize DMA cancellation with buffer reuse James Hilliard
2026-11-09 3:50 ` [PATCH v10 1/8] serial: 8250_omap: separate locked TX DMA completion processing James Hilliard
2026-11-09 3:56 ` sashiko-bot
2026-11-09 3:50 ` [PATCH v10 2/8] serial: serialize asynchronous write wakeups with the port lock James Hilliard
2026-11-09 4:04 ` sashiko-bot
2026-11-09 22:57 ` Andy Shevchenko
2026-11-09 3:50 ` [PATCH v10 3/8] serial: 8250_omap: serialize RX DMA completion and flushing James Hilliard
2026-11-09 4:08 ` sashiko-bot
2026-11-09 3:50 ` [PATCH v10 4/8] serial: 8250_omap: quiesce DMA IRQ handling before shutdown James Hilliard
2026-11-09 4:00 ` sashiko-bot
2026-11-09 3:50 ` [PATCH v10 5/8] serial: core: allow drivers to reserve flushed transmit storage James Hilliard
2026-11-09 4:07 ` sashiko-bot [this message]
2026-11-09 3:50 ` [PATCH v10 6/8] serial: 8250: drain canceled TX DMA before reusing its buffer James Hilliard
2026-11-09 4:03 ` sashiko-bot
2026-11-09 3:50 ` [PATCH v10 7/8] serial: 8250: retire canceled RX DMA before reusing the receive buffer James Hilliard
2026-11-09 4:22 ` sashiko-bot
2026-11-09 16:21 ` Raul E Rangel
2026-11-09 3:50 ` [PATCH v10 8/8] serial: 8250: retain DMA resources when termination fails James Hilliard
2026-11-09 4:05 ` sashiko-bot
2026-11-09 16:21 ` Raul E Rangel
-- strict thread matches above, loose matches on Subject: below --
2026-11-02 23:14 [PATCH v9 0/8] serial: 8250: serialize DMA cancellation with buffer reuse James Hilliard
2026-11-02 23:14 ` [PATCH v9 1/8] serial: 8250_omap: separate locked TX DMA completion processing James Hilliard
2026-11-02 23:21 ` sashiko-bot
2026-11-03 16:10 ` Raul E Rangel
2026-11-02 23:14 ` [PATCH v9 2/8] serial: serialize asynchronous write wakeups with the port lock James Hilliard
2026-11-02 23:25 ` sashiko-bot
2026-11-03 16:10 ` Raul E Rangel
2026-11-03 17:06 ` Andy Shevchenko
2026-11-03 20:25 ` Maciej W. Rozycki
2026-11-02 23:14 ` [PATCH v9 3/8] serial: 8250_omap: serialize RX DMA completion and flushing James Hilliard
2026-11-02 23:32 ` sashiko-bot
2026-11-03 11:55 ` Ilpo Järvinen
2026-11-03 16:10 ` Raul E Rangel
2026-11-02 23:14 ` [PATCH v9 4/8] serial: 8250_omap: quiesce DMA IRQ handling before shutdown James Hilliard
2026-11-02 23:22 ` sashiko-bot
2026-11-03 16:11 ` Raul E Rangel
2026-11-02 23:14 ` [PATCH v9 5/8] serial: core: allow drivers to reserve flushed transmit storage James Hilliard
2026-11-02 23:32 ` sashiko-bot
2026-11-03 16:11 ` Raul E Rangel
2026-11-03 17:08 ` Andy Shevchenko
2026-11-02 23:14 ` [PATCH v9 6/8] serial: 8250: drain canceled TX DMA before reusing its buffer James Hilliard
2026-11-02 23:28 ` sashiko-bot
2026-11-03 16:11 ` Raul E Rangel
2026-11-03 17:21 ` Andy Shevchenko
2026-11-02 23:14 ` [PATCH v9 7/8] serial: 8250: retire canceled RX DMA before reusing the receive buffer James Hilliard
2026-11-02 23:49 ` sashiko-bot
2026-11-03 1:23 ` James Hilliard
2026-11-03 16:11 ` Raul E Rangel
2026-11-03 18:05 ` James Hilliard
2026-11-03 17:33 ` Andy Shevchenko
2026-11-03 17:54 ` James Hilliard
2026-11-03 18:06 ` Andy Shevchenko
2026-11-03 18:16 ` James Hilliard
2026-11-03 20:59 ` Andy Shevchenko
2026-11-02 23:14 ` [PATCH v9 8/8] serial: 8250: retain DMA resources when termination fails James Hilliard
2026-11-02 23:29 ` sashiko-bot
2026-11-03 16:11 ` Raul E Rangel
2026-11-03 17:35 ` 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-204395@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.