From: Biju Das <biju.das.au@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Kiryl Shutsemau <kas@kernel.org>,
Rick Edgecombe <rick.p.edgecombe@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
linux-renesas-soc@vger.kernel.org, x86@kernel.org,
linux-coco@lists.linux.dev, kvm@vger.kernel.org,
Biju Das <biju.das.jz@bp.renesas.com>,
Au Dang <au.dang.jx@renesas.com>
Subject: [PATCH v3 0/4] Fix transmit handling on SCI/RSCI ports
Date: Mon, 26 Oct 2026 11:23:32 +0000 [thread overview]
Message-ID: <20261026-g2ul_sci-v3-0-b3097163edd5@bp.renesas.com> (raw)
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.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
Changes in v3:
* Updated commit description for patch#2
* When the port is stopped with data still queued, the transmit_chars()
paths (sci_transmit_chars() and rsci_transmit_chars()) now also swap
TIE for TEIE, as they already did for an empty kfifo. Without this, TIE
would keep firing with nothing the driver is allowed to send, and TEI
would never be raised to complete the transmission.
* Replaced sci_tx_interrupt() with port's transmit_chars() to avoid
lock drop race in sci_tx_end_interrupt() before TX handoff.
* Added missing has_tdxe_auto_clear init in scix_early_console_setup().
* Replaced to_sci_port(port)->type with sci_port->type in
serial_console_write().
- Link to v2: https://lore.kernel.org/r/20261021-g2ul_sci-v2-0-b4e038220018@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 | 4 ++-
drivers/tty/serial/sh-sci-common.h | 4 +++
drivers/tty/serial/sh-sci.c | 71 ++++++++++++++++++++++++++------------
3 files changed, 56 insertions(+), 23 deletions(-)
---
base-commit: 8f7df005a7564bd7ffa75da9c3085d5b996f1e16
change-id: 20261020-g2ul_sci-b610606ea5b5
Best regards,
--
Biju Das <biju.das.jz@bp.renesas.com>
next reply other threads:[~2026-10-26 11:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 11:23 Biju Das [this message]
2026-10-26 11:23 ` [PATCH v3 1/4] serial: sh-sci: Drop TE disable at end of transmission on SCI Biju Das
2026-10-26 11:23 ` [PATCH v3 2/4] serial: sh-sci: Keep TX enabled on TEI while data is pending Biju Das
2026-10-26 11:23 ` [PATCH v3 3/4] serial: sh-sci: Skip TDxE clear when hardware clears it automatically Biju Das
2026-10-26 11:23 ` [PATCH v3 4/4] serial: sh-sci: Toggle TE when restoring SCSCR in console write on SCI Biju Das
2026-10-27 5:57 ` [PATCH v3 0/4] Fix transmit handling on SCI/RSCI ports Borislav Petkov
2026-10-27 7:19 ` Biju Das
2026-10-27 7:23 ` Krzysztof Kozlowski
2026-10-27 8:33 ` Biju Das
2026-10-27 9:34 ` Krzysztof Kozlowski
2026-10-27 20:54 ` Borislav Petkov
2026-10-28 9:13 ` Biju Das
2026-10-28 11:02 ` Krzysztof Kozlowski
2026-10-28 15:47 ` Borislav Petkov
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=20261026-g2ul_sci-v3-0-b3097163edd5@bp.renesas.com \
--to=biju.das.au@gmail.com \
--cc=au.dang.jx@renesas.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=dave.hansen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kas@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-coco@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=rick.p.edgecombe@intel.com \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®