]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jan 2018 13:34:57 +0000 (14:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Jan 2018 13:34:57 +0000 (14:34 +0100)
added patches:
mips-ar7-ensure-the-port-type-s-fcr-value-is-used.patch

queue-4.9/mips-ar7-ensure-the-port-type-s-fcr-value-is-used.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/mips-ar7-ensure-the-port-type-s-fcr-value-is-used.patch b/queue-4.9/mips-ar7-ensure-the-port-type-s-fcr-value-is-used.patch
new file mode 100644 (file)
index 0000000..3623b95
--- /dev/null
@@ -0,0 +1,59 @@
+From 0a5191efe06b5103909206e4fbcff81d30283f8e Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@gmail.com>
+Date: Sun, 29 Oct 2017 16:27:21 +0100
+Subject: MIPS: AR7: ensure the port type's FCR value is used
+
+From: Jonas Gorski <jonas.gorski@gmail.com>
+
+commit 0a5191efe06b5103909206e4fbcff81d30283f8e upstream.
+
+Since commit aef9a7bd9b67 ("serial/uart/8250: Add tunable RX interrupt
+trigger I/F of FIFO buffers"), the port's default FCR value isn't used
+in serial8250_do_set_termios anymore, but copied over once in
+serial8250_config_port and then modified as needed.
+
+Unfortunately, serial8250_config_port will never be called if the port
+is shared between kernel and userspace, and the port's flag doesn't have
+UPF_BOOT_AUTOCONF, which would trigger a serial8250_config_port as well.
+
+This causes garbled output from userspace:
+
+[    5.220000] random: procd urandom read with 49 bits of entropy available
+ers
+   [kee
+
+Fix this by forcing it to be configured on boot, resulting in the
+expected output:
+
+[    5.250000] random: procd urandom read with 50 bits of entropy available
+Press the [f] key and hit [enter] to enter failsafe mode
+Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
+
+Fixes: aef9a7bd9b67 ("serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers")
+Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
+Cc: Florian Fainelli <f.fainelli@gmail.com>
+Cc: Nicolas Schichan <nschichan@freebox.fr>
+Cc: linux-mips@linux-mips.org
+Cc: linux-serial@vger.kernel.org
+Patchwork: https://patchwork.linux-mips.org/patch/17544/
+Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
+Cc: James Hogan <jhogan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/mips/ar7/platform.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/mips/ar7/platform.c
++++ b/arch/mips/ar7/platform.c
+@@ -576,7 +576,7 @@ static int __init ar7_register_uarts(voi
+       uart_port.type          = PORT_AR7;
+       uart_port.uartclk       = clk_get_rate(bus_clk) / 2;
+       uart_port.iotype        = UPIO_MEM32;
+-      uart_port.flags         = UPF_FIXED_TYPE;
++      uart_port.flags         = UPF_FIXED_TYPE | UPF_BOOT_AUTOCONF;
+       uart_port.regshift      = 2;
+       uart_port.line          = 0;
index 4bd5be9195e0e82f813afd14c8bf9cf1c7188ddd..703944ee3265a1e3851111e8d62abada7a688fd1 100644 (file)
@@ -45,3 +45,4 @@ kprobes-x86-blacklist-indirect-thunk-functions-for-kprobes.patch
 kprobes-x86-disable-optimizing-on-the-function-jumps-to-indirect-thunk.patch
 x86-pti-document-fix-wrong-index.patch
 x86-retpoline-optimize-inline-assembler-for-vmexit_fill_rsb.patch
+mips-ar7-ensure-the-port-type-s-fcr-value-is-used.patch