All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] serial: 8250: serialize DMA cancellation with buffer reuse
@ 2026-10-21 22:37 James Hilliard
  2026-10-21 22:37 ` [PATCH 1/2] serial: 8250: drain canceled TX DMA before reusing its buffer James Hilliard
  2026-10-21 22:37 ` [PATCH 2/2] serial: 8250: retire canceled RX DMA before reusing the receive buffer James Hilliard
  0 siblings, 2 replies; 9+ messages in thread
From: James Hilliard @ 2026-10-21 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Raul E Rangel, Ilpo Järvinen,
	Andy Shevchenko, Heikki Krogerus
  Cc: linux-kernel, linux-serial, James Hilliard

Keep canceled transmit and receive buffers reserved until the provider's
completion callbacks have finished. The TX fix also separates the DMA
source from the serial core's kfifo, which is reset before the driver is
called to flush a transfer. The RX fix keeps partial-buffer delivery ahead
of the PIO fallback while the canceled descriptor is retired.

These changes repair the existing finite-transfer DMA path.
DMA providers must honor the existing terminate/synchronize contract;
fixes for providers that do not are separate DMAengine work.

Based on tty-next with the posted shutdown guard [0], channel
configuration error handling [1], and RX TTY accounting fix [2].

[0] https://lore.kernel.org/r/20261021-submit-serial-8250-dma-shutdown-v1-v1-1-3d3ce383c614@gmail.com
[1] https://lore.kernel.org/r/20261021-submit-serial-8250-dma-config-errors-v1-v1-1-c067587d1ef2@gmail.com
[2] https://lore.kernel.org/r/20261021-submit-serial-8250-dma-rx-accounting-v1-v1-1-c11795914ab4@gmail.com

Assisted-by: Codex:gpt-6-astra
Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
James Hilliard (2):
      serial: 8250: drain canceled TX DMA before reusing its buffer
      serial: 8250: retire canceled RX DMA before reusing the receive buffer

 drivers/tty/serial/8250/8250.h      |  20 +++-
 drivers/tty/serial/8250/8250_dma.c  | 205 ++++++++++++++++++++++++++----------
 drivers/tty/serial/8250/8250_dw.c   |   8 +-
 drivers/tty/serial/8250/8250_mid.c  |   6 +-
 drivers/tty/serial/8250/8250_omap.c |  26 +++--
 drivers/tty/serial/8250/8250_port.c |   3 +-
 6 files changed, 191 insertions(+), 77 deletions(-)
---
base-commit: 1184f87e2790e8af9be3116f608d2e86b4792d7d
change-id: 20261021-submit-serial-8250-dma-cancel-v1-b208f84e89c1
prerequisite-patch-id: 3604bfaa3a1c214997de1f11162b81a4541af5ab
prerequisite-patch-id: 79dd093ffb35e254e790dffb8887faf51b64f947
prerequisite-patch-id: 80a5061d84c055a64c760268febed179c687b99f

Best regards,
--  
James Hilliard <james.hilliard1@gmail.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-10-23  2:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 22:37 [PATCH 0/2] serial: 8250: serialize DMA cancellation with buffer reuse James Hilliard
2026-10-21 22:37 ` [PATCH 1/2] serial: 8250: drain canceled TX DMA before reusing its buffer James Hilliard
2026-10-21 22:50   ` sashiko-bot
2026-10-22 14:00   ` Andy Shevchenko
2026-10-23  2:20     ` James Hilliard
2026-10-22 15:20   ` Raul E Rangel
2026-10-21 22:37 ` [PATCH 2/2] serial: 8250: retire canceled RX DMA before reusing the receive buffer James Hilliard
2026-10-21 23:05   ` sashiko-bot
2026-10-22 15:20   ` Raul E Rangel

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.