]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
serial: sh-sci: remove obsolete latency workaround
authorUlrich Hecht <uli+renesas@fpond.eu>
Thu, 15 Apr 2021 09:35:47 +0000 (11:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Apr 2021 10:59:16 +0000 (12:59 +0200)
Since the transition to hrtimers there is no more need to set a minimum
RX timeout to work around latency issues.

Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Ulrich Hecht <uli+renesas@fpond.eu>
Link: https://lore.kernel.org/r/20210415093547.21639-1-uli+renesas@fpond.eu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c

index e3af97a59856bf2dcd655a364aef35e02e52322f..ef37fdf37612f82f1ce280d885775f3178820fe1 100644 (file)
@@ -2609,21 +2609,10 @@ done:
                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)