Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Fix transmit handling on SCI/RSCI ports
@ 2026-10-21 13:13 Biju Das
  2026-10-21 13:13 ` [PATCH v2 1/4] serial: sh-sci: Drop TE disable at end of transmission on SCI Biju Das
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Biju Das @ 2026-10-21 13:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby, Kiryl Shutsemau, Rick Edgecombe,
	Dave Hansen
  Cc: linux-kernel, linux-serial, linux-renesas-soc, x86, linux-coco,
	kvm, Biju Das, Au Dang

Hi All,

This series fixes several transmit problems on the SCI (PORT_SCI) and
RSCI ports of the sh-sci driver, seen on Renesas RZ SoCs:

 - Patch 1 removes the code that disables TE at the end of a
   transmission on SCI, which the hardware manual does not describe.
 - Patch 2 stops the TEI handler from turning the transmitter off
   while the xmit kfifo still holds data, which could stall or lose
   output. It also covers the TE handling that patch 1 no longer does
   in sci_transmit_chars().
 - Patch 3 skips the software clear of the TDxE flag on SCI, since
   hardware clears it on a TDR write and the extra clear caused a
   spurious TXI and a duplicated last character.
 - Patch 4 forces a TE toggle when restoring SCSCR in the console
   write path on SCI, so the TXI that restarts an interrupted drain is
   generated. Without it the RZ/G2UL console can hang during boot.

To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jiri Slaby <jirislaby@kernel.org>
To: Kiryl Shutsemau <kas@kernel.org>
To: Rick Edgecombe <rick.p.edgecombe@intel.com>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-serial@vger.kernel.org
CC: linux-renesas-soc@vger.kernel.org
Cc: x86@kernel.org
Cc: linux-coco@lists.linux.dev
Cc: kvm@vger.kernel.org
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>

Changes in v2:
 * Updated commit header and description for patch#2 and #3.
 * Take the port lock before reading the control register, so the
   read-modify-write in sci_tx_end_interrupt() is protected.
 * Extended the pending-data check in sci_tx_end_interrupt() to cover
   x_char and a stopped port, not only a non-empty xmit kfifo.
 * Replaced the PORT_SCI check with a has_tdxe_auto_clear flag in
   struct sci_port, set from the new tdxe_auto_clear field in
   struct sci_of_data.
- Link to v1: https://lore.kernel.org/r/20261019170139.473808-1-biju.das.jz@bp.renesas.com

---
Au Dang (2):
      serial: sh-sci: Skip TDxE clear when hardware clears it automatically
      serial: sh-sci: Toggle TE when restoring SCSCR in console write on SCI

Biju Das (2):
      serial: sh-sci: Drop TE disable at end of transmission on SCI
      serial: sh-sci: Keep TX enabled on TEI while data is pending

 drivers/tty/serial/rsci.c          |  2 ++
 drivers/tty/serial/sh-sci-common.h |  4 ++++
 drivers/tty/serial/sh-sci.c        | 45 +++++++++++++++++++++++++-------------
 3 files changed, 36 insertions(+), 15 deletions(-)
---
base-commit: 8f7df005a7564bd7ffa75da9c3085d5b996f1e16
change-id: 20261020-g2ul_sci-b610606ea5b5

Best regards,
-- 
Biju Das <biju.das.jz@bp.renesas.com>


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

end of thread, other threads:[~2026-10-22 10:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 13:13 [PATCH v2 0/4] Fix transmit handling on SCI/RSCI ports Biju Das
2026-10-21 13:13 ` [PATCH v2 1/4] serial: sh-sci: Drop TE disable at end of transmission on SCI Biju Das
2026-10-21 13:18   ` sashiko-bot
2026-10-21 13:13 ` [PATCH v2 2/4] serial: sh-sci: Keep TX enabled on TEI while data is pending Biju Das
2026-10-21 13:38   ` sashiko-bot
2026-10-22 10:28     ` Biju Das
2026-10-21 13:13 ` [PATCH v2 3/4] serial: sh-sci: Skip TDxE clear when hardware clears it automatically Biju Das
2026-10-21 13:22   ` sashiko-bot
2026-10-22 10:29     ` Biju Das
2026-10-21 13:13 ` [PATCH v2 4/4] serial: sh-sci: Toggle TE when restoring SCSCR in console write on SCI Biju Das
2026-10-21 13:19   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox