]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Dec 2021 12:10:17 +0000 (13:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Dec 2021 12:10:17 +0000 (13:10 +0100)
added patches:
serial-8250_fintek-fix-garbled-text-for-console.patch

queue-5.4/serial-8250_fintek-fix-garbled-text-for-console.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/serial-8250_fintek-fix-garbled-text-for-console.patch b/queue-5.4/serial-8250_fintek-fix-garbled-text-for-console.patch
new file mode 100644 (file)
index 0000000..4f003a9
--- /dev/null
@@ -0,0 +1,78 @@
+From 6c33ff728812aa18792afffaf2c9873b898e7512 Mon Sep 17 00:00:00 2001
+From: "Ji-Ze Hong (Peter Hong)" <hpeter@gmail.com>
+Date: Wed, 15 Dec 2021 15:58:35 +0800
+Subject: serial: 8250_fintek: Fix garbled text for console
+
+From: Ji-Ze Hong (Peter Hong) <hpeter@gmail.com>
+
+commit 6c33ff728812aa18792afffaf2c9873b898e7512 upstream.
+
+Commit fab8a02b73eb ("serial: 8250_fintek: Enable high speed mode on Fintek F81866")
+introduced support to use high baudrate with Fintek SuperIO UARTs. It'll
+change clocksources when the UART probed.
+
+But when user add kernel parameter "console=ttyS0,115200 console=tty0" to make
+the UART as console output, the console will output garbled text after the
+following kernel message.
+
+[    3.681188] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
+
+The issue is occurs in following step:
+       probe_setup_port() -> fintek_8250_goto_highspeed()
+
+It change clocksource from 115200 to 921600 with wrong time, it should change
+clocksource in set_termios() not in probed. The following 3 patches are
+implemented change clocksource in fintek_8250_set_termios().
+
+Commit 58178914ae5b ("serial: 8250_fintek: UART dynamic clocksource on Fintek F81216H")
+Commit 195638b6d44f ("serial: 8250_fintek: UART dynamic clocksource on Fintek F81866")
+Commit 423d9118c624 ("serial: 8250_fintek: Add F81966 Support")
+
+Due to the high baud rate had implemented above 3 patches and the patch
+Commit fab8a02b73eb ("serial: 8250_fintek: Enable high speed mode on Fintek F81866")
+is bugged, So this patch will remove it.
+
+Fixes: fab8a02b73eb ("serial: 8250_fintek: Enable high speed mode on Fintek F81866")
+Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
+Link: https://lore.kernel.org/r/20211215075835.2072-1-hpeter+linux_kernel@gmail.com
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/tty/serial/8250/8250_fintek.c |   19 -------------------
+ 1 file changed, 19 deletions(-)
+
+--- a/drivers/tty/serial/8250/8250_fintek.c
++++ b/drivers/tty/serial/8250/8250_fintek.c
+@@ -285,24 +285,6 @@ static void fintek_8250_set_max_fifo(str
+       }
+ }
+-static void fintek_8250_goto_highspeed(struct uart_8250_port *uart,
+-                            struct fintek_8250 *pdata)
+-{
+-      sio_write_reg(pdata, LDN, pdata->index);
+-
+-      switch (pdata->pid) {
+-      case CHIP_ID_F81866: /* set uart clock for high speed serial mode */
+-              sio_write_mask_reg(pdata, F81866_UART_CLK,
+-                      F81866_UART_CLK_MASK,
+-                      F81866_UART_CLK_14_769MHZ);
+-
+-              uart->port.uartclk = 921600 * 16;
+-              break;
+-      default: /* leave clock speed untouched */
+-              break;
+-      }
+-}
+-
+ static void fintek_8250_set_termios(struct uart_port *port,
+                                   struct ktermios *termios,
+                                   struct ktermios *old)
+@@ -422,7 +404,6 @@ static int probe_setup_port(struct finte
+                               fintek_8250_set_irq_mode(pdata, level_mode);
+                               fintek_8250_set_max_fifo(pdata);
+-                              fintek_8250_goto_highspeed(uart, pdata);
+                               fintek_8250_exit_key(addr[i]);
index 46c52fd9363684cb4091371b64ec790dbd7cbf3f..58ff6d4bf1a4fe3c590c39fe1c11a02d53488157 100644 (file)
@@ -1 +1,2 @@
 net-usb-lan78xx-add-allied-telesis-at29m2-af.patch
+serial-8250_fintek-fix-garbled-text-for-console.patch