* [PATCH] serial: sh-sci: remove obsolete latency workaround
@ 2021-04-13 8:46 Ulrich Hecht
2021-04-15 8:12 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Hecht @ 2021-04-13 8:46 UTC (permalink / raw)
To: linux-renesas-soc, linux-serial
Cc: wsa, geert, yoshihiro.shimoda.uh, Ulrich Hecht
Since the transition to hrtimers there is no more need to set a minimum
RX timeout to work around latency issues.
Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
---
drivers/tty/serial/sh-sci.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index e3af97a59856..ef37fdf37612 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2609,21 +2609,10 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
udelay(DIV_ROUND_UP(10 * 1000000, baud));
}
- /*
- * Calculate delay for 2 DMA buffers (4 FIFO).
- * See serial_core.c::uart_update_timeout().
- * With 10 bits (CS8), 250Hz, 115200 baud and 64 bytes FIFO, the above
- * function calculates 1 jiffie for the data plus 5 jiffies for the
- * "slop(e)." Then below we calculate 5 jiffies (20ms) for 2 DMA
- * buffers (4 FIFO sizes), but when performing a faster transfer, the
- * value obtained by this formula is too small. Therefore, if the value
- * is smaller than 20ms, use 20ms as the timeout value for DMA.
- */
+ /* Calculate delay for 2 DMA buffers (4 FIFO). */
s->rx_frame = (10000 * bits) / (baud / 100);
#ifdef CONFIG_SERIAL_SH_SCI_DMA
s->rx_timeout = s->buf_len_rx * 2 * s->rx_frame;
- if (s->rx_timeout < 20)
- s->rx_timeout = 20;
#endif
if ((termios->c_cflag & CREAD) != 0)
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] serial: sh-sci: remove obsolete latency workaround
2021-04-13 8:46 [PATCH] serial: sh-sci: remove obsolete latency workaround Ulrich Hecht
@ 2021-04-15 8:12 ` Greg KH
2021-04-15 9:36 ` Ulrich Hecht
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2021-04-15 8:12 UTC (permalink / raw)
To: Ulrich Hecht
Cc: linux-renesas-soc, linux-serial, wsa, geert, yoshihiro.shimoda.uh
On Tue, Apr 13, 2021 at 10:46:11AM +0200, Ulrich Hecht wrote:
> Since the transition to hrtimers there is no more need to set a minimum
> RX timeout to work around latency issues.
>
> Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
> ---
> drivers/tty/serial/sh-sci.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
$ ./scripts/get_maintainer.pl --file drivers/tty/serial/sh-sci.c
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (maintainer:SERIAL DRIVERS)
Jiri Slaby <jirislaby@kernel.org> (supporter:TTY LAYER)
linux-serial@vger.kernel.org (open list:SERIAL DRIVERS)
linux-kernel@vger.kernel.org (open list)
{sigh}
Care to resend this and cc: the other developers here?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] serial: sh-sci: remove obsolete latency workaround
2021-04-15 8:12 ` Greg KH
@ 2021-04-15 9:36 ` Ulrich Hecht
0 siblings, 0 replies; 5+ messages in thread
From: Ulrich Hecht @ 2021-04-15 9:36 UTC (permalink / raw)
To: Greg KH; +Cc: linux-renesas-soc, linux-serial, wsa, geert, yoshihiro.shimoda.uh
> On 04/15/2021 10:12 AM Greg KH <gregkh@linuxfoundation.org> wrote:
> Care to resend this and cc: the other developers here?
Done. Sorry for the inconvenience.
CU
Uli
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] serial: sh-sci: remove obsolete latency workaround
2021-04-15 9:35 Ulrich Hecht
@ 2021-04-15 9:47 ` Yoshihiro Shimoda
0 siblings, 0 replies; 5+ messages in thread
From: Yoshihiro Shimoda @ 2021-04-15 9:47 UTC (permalink / raw)
To: Ulrich Hecht, linux-renesas-soc, linux-serial
Cc: wsa, geert, gregkh, jirislaby, linux-kernel
Hi Ulrich-san,
> From: Ulrich Hecht, Sent: Thursday, April 15, 2021 6:36 PM
>
> Since the transition to hrtimers there is no more need to set a minimum
> RX timeout to work around latency issues.
>
> Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
Thank you for the patch!
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Best regards,
Yoshihiro Shimoda
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] serial: sh-sci: remove obsolete latency workaround
@ 2021-04-15 9:35 Ulrich Hecht
2021-04-15 9:47 ` Yoshihiro Shimoda
0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Hecht @ 2021-04-15 9:35 UTC (permalink / raw)
To: linux-renesas-soc, linux-serial
Cc: wsa, geert, yoshihiro.shimoda.uh, gregkh, jirislaby,
linux-kernel, Ulrich Hecht
Since the transition to hrtimers there is no more need to set a minimum
RX timeout to work around latency issues.
Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
---
drivers/tty/serial/sh-sci.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index e3af97a59856..ef37fdf37612 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2609,21 +2609,10 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
udelay(DIV_ROUND_UP(10 * 1000000, baud));
}
- /*
- * Calculate delay for 2 DMA buffers (4 FIFO).
- * See serial_core.c::uart_update_timeout().
- * With 10 bits (CS8), 250Hz, 115200 baud and 64 bytes FIFO, the above
- * function calculates 1 jiffie for the data plus 5 jiffies for the
- * "slop(e)." Then below we calculate 5 jiffies (20ms) for 2 DMA
- * buffers (4 FIFO sizes), but when performing a faster transfer, the
- * value obtained by this formula is too small. Therefore, if the value
- * is smaller than 20ms, use 20ms as the timeout value for DMA.
- */
+ /* Calculate delay for 2 DMA buffers (4 FIFO). */
s->rx_frame = (10000 * bits) / (baud / 100);
#ifdef CONFIG_SERIAL_SH_SCI_DMA
s->rx_timeout = s->buf_len_rx * 2 * s->rx_frame;
- if (s->rx_timeout < 20)
- s->rx_timeout = 20;
#endif
if ((termios->c_cflag & CREAD) != 0)
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-15 9:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 8:46 [PATCH] serial: sh-sci: remove obsolete latency workaround Ulrich Hecht
2021-04-15 8:12 ` Greg KH
2021-04-15 9:36 ` Ulrich Hecht
2021-04-15 9:35 Ulrich Hecht
2021-04-15 9:47 ` Yoshihiro Shimoda
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.