* [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO
@ 2026-11-27 16:03 Diogo Ivo
2026-11-27 16:03 ` [PATCH 1/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on T2H Diogo Ivo
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Diogo Ivo @ 2026-11-27 16:03 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Thierry Bultel, Lad Prabhakar,
Geert Uytterhoeven, Wolfram Sang, Biju Das, Cosmin Tanislav
Cc: linux-kernel, linux-serial, linux-renesas-soc, Diogo Ivo, stable
The RSCI port types ask for a RX FIFO trigger equal to their FIFO size,
which rsci_scif_set_rtrg() clamps to fifosize - 1. RDRF is raised once
the FIFO holds at least RTRG bytes, so the receive interrupt arrives
with a single byte of space left, causing overruns at 1152000 baud on
RZ/T2H, and at 115200 baud on RZ/G3L.
Every other port with a FIFO triggers at half of it, SCIF at 8 of 16 and
HSCIF at 64 of 128. The only exceptions are SCIFA and SCIFB which set it
to 1 because they have no hardware FIFO timeout and a higher trigger
would leave bytes in the FIFO.
Trigger at half the FIFO for RSCI as well, 8 of 16 for RSCI_PORT_SCIF16
and 16 of 32 for the RSCI_PORT_SCIF32 types. The series splits this into
three patches, one for each RSCI port type, in order to make backporting
easier.
For the first patch, adjusting RZ/T2H, some changes are needed in order
to apply it to 6.18 stable since mainline has diverged due to commits
3a3ab10245b6 ("serial: sh-sci: Update rx_trigger size for RZ/T2H RSCI") and
d53f4aa9edaa ("serial: sh-sci: Rename port SCI_PORT_RSCI->RSCI_PORT_SCIF16").
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
Diogo Ivo (3):
tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on T2H
tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3E
tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3L
drivers/tty/serial/sh-sci.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
base-commit: 27fc36c7e3e22d67db77f8076020cb4c5080668e
change-id: 20261127-divo-ssgrlpcsrc-2996-rsci-rx-fixes-371a4751707c
Best regards,
--
Diogo Ivo <diogo.ivo.sx@renesas.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on T2H
2026-11-27 16:03 [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
@ 2026-11-27 16:03 ` Diogo Ivo
2026-11-27 16:03 ` [PATCH 2/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3E Diogo Ivo
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Diogo Ivo @ 2026-11-27 16:03 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Thierry Bultel, Lad Prabhakar,
Geert Uytterhoeven, Wolfram Sang, Biju Das, Cosmin Tanislav
Cc: linux-kernel, linux-serial, linux-renesas-soc, Diogo Ivo, stable
From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
The RSCI port types ask for a RX FIFO trigger equal to their FIFO size,
which rsci_scif_set_rtrg() clamps to fifosize - 1. RDRF is raised once
the FIFO holds at least RTRG bytes, so the receive interrupt arrives
with a single byte of space left, causing overruns at 1152000 baud on
RZ/T2H.
Every other port with a FIFO triggers at half of it, SCIF at 8 of 16 and
HSCIF at 64 of 128. The only exceptions are SCIFA and SCIFB which set it
to 1 because they have no hardware FIFO timeout and a higher trigger
would leave bytes in the FIFO.
Trigger at half the FIFO (8 of 16) for RSCI_PORT_SCIF16.
Cc: stable@vger.kernel.org # needs adjustments for 6.18 (rx_trigger = 15)
Fixes: 0666e3fe95ab ("serial: sh-sci: Add support for RZ/T2H SCI")
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Co-developed-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
drivers/tty/serial/sh-sci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index f5194cfa3364..6c156646d5cd 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3360,7 +3360,7 @@ static int sci_init_single(struct platform_device *dev,
sci_port->rx_trigger = 8;
break;
case RSCI_PORT_SCIF16:
- sci_port->rx_trigger = 16;
+ sci_port->rx_trigger = 8;
break;
default:
sci_port->rx_trigger = 1;
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3E
2026-11-27 16:03 [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
2026-11-27 16:03 ` [PATCH 1/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on T2H Diogo Ivo
@ 2026-11-27 16:03 ` Diogo Ivo
2026-11-27 16:03 ` [PATCH 3/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3L Diogo Ivo
2026-11-27 16:12 ` [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO sashiko-bot
3 siblings, 0 replies; 5+ messages in thread
From: Diogo Ivo @ 2026-11-27 16:03 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Thierry Bultel, Lad Prabhakar,
Geert Uytterhoeven, Wolfram Sang, Biju Das, Cosmin Tanislav
Cc: linux-kernel, linux-serial, linux-renesas-soc, Diogo Ivo, stable
From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
The RSCI port types ask for a RX FIFO trigger equal to their FIFO size,
which rsci_scif_set_rtrg() clamps to fifosize - 1. RDRF is raised once
the FIFO holds at least RTRG bytes, so the receive interrupt arrives
with a single byte of space left.
Every other port with a FIFO triggers at half of it, SCIF at 8 of 16 and
HSCIF at 64 of 128. The only exceptions are SCIFA and SCIFB which set it
to 1 because they have no hardware FIFO timeout and a higher trigger
would leave bytes in the FIFO.
Trigger at half the FIFO (16 of 32) for RSCI_PORT_SCIF32.
Cc: stable@vger.kernel.org
Fixes: 42eeed6d9f31 ("serial: sh-sci: Add support for RZ/G3E RSCI")
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Co-developed-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
drivers/tty/serial/sh-sci.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 6c156646d5cd..dcd97f9b5268 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3348,10 +3348,12 @@ static int sci_init_single(struct platform_device *dev,
sci_port->rx_trigger = 64;
break;
case PORT_SCIFA:
- case RSCI_PORT_SCIF32:
case RSCI_PORT_SCIF32_SINGLE_TCLK:
sci_port->rx_trigger = 32;
break;
+ case RSCI_PORT_SCIF32:
+ sci_port->rx_trigger = 16;
+ break;
case PORT_SCIF:
if (p->regtype == SCIx_SH7705_SCIF_REGTYPE)
/* RX triggering not implemented for this IP */
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 3/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3L
2026-11-27 16:03 [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
2026-11-27 16:03 ` [PATCH 1/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on T2H Diogo Ivo
2026-11-27 16:03 ` [PATCH 2/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3E Diogo Ivo
@ 2026-11-27 16:03 ` Diogo Ivo
2026-11-27 16:12 ` [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO sashiko-bot
3 siblings, 0 replies; 5+ messages in thread
From: Diogo Ivo @ 2026-11-27 16:03 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Thierry Bultel, Lad Prabhakar,
Geert Uytterhoeven, Wolfram Sang, Biju Das, Cosmin Tanislav
Cc: linux-kernel, linux-serial, linux-renesas-soc, Diogo Ivo, stable
From: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
The RSCI port types ask for a RX FIFO trigger equal to their FIFO size,
which rsci_scif_set_rtrg() clamps to fifosize - 1. RDRF is raised once
the FIFO holds at least RTRG bytes, so the receive interrupt arrives
with a single byte of space left, causing overruns at 115200 baud on
RZ/G3L.
Every other port with a FIFO triggers at half of it, SCIF at 8 of 16 and
HSCIF at 64 of 128. The only exceptions are SCIFA and SCIFB which set it
to 1 because they have no hardware FIFO timeout and a higher trigger
would leave bytes in the FIFO.
Trigger at half the FIFO (16 of 32) for RSCI_PORT_SCIF32_SINGLE_TCLK.
Cc: stable@vger.kernel.org
Fixes: 8f18d3cbd920 ("serial: sh-sci: Add support for RZ/G3L RSCI")
Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@renesas.com>
Co-developed-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
Signed-off-by: Diogo Ivo <diogo.ivo.sx@renesas.com>
---
drivers/tty/serial/sh-sci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index dcd97f9b5268..1ab0e5677791 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -3348,10 +3348,10 @@ static int sci_init_single(struct platform_device *dev,
sci_port->rx_trigger = 64;
break;
case PORT_SCIFA:
- case RSCI_PORT_SCIF32_SINGLE_TCLK:
sci_port->rx_trigger = 32;
break;
case RSCI_PORT_SCIF32:
+ case RSCI_PORT_SCIF32_SINGLE_TCLK:
sci_port->rx_trigger = 16;
break;
case PORT_SCIF:
--
2.56.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO
2026-11-27 16:03 [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
` (2 preceding siblings ...)
2026-11-27 16:03 ` [PATCH 3/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3L Diogo Ivo
@ 2026-11-27 16:12 ` sashiko-bot
3 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-27 16:12 UTC (permalink / raw)
To: Diogo Ivo; +Cc: linux-serial
Sashiko has reviewed this 3-patch series and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-divo-ssgrlpcsrc-2996-rsci-rx-fixes-v1-0-cad6ce9f83bc@renesas.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-27 16:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 16:03 [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO Diogo Ivo
2026-11-27 16:03 ` [PATCH 1/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on T2H Diogo Ivo
2026-11-27 16:03 ` [PATCH 2/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3E Diogo Ivo
2026-11-27 16:03 ` [PATCH 3/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO on G3L Diogo Ivo
2026-11-27 16:12 ` [PATCH 0/3] tty: serial: sh-sci: set the RSCI RX FIFO trigger to half the FIFO sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox