Skip to contentSkip to conversation

Patch "MIPS: AR7: ensure the port type's FCR value is used" has been added to the 3.18-stable tree

PATCH [email protected] 1 participant 1 message Jan 22, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

MIPS: AR7: ensure the port type's FCR value is used

to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mips-ar7-ensure-the-port-type-s-fcr-value-is-used.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 0a5191efe06b5103909206e4fbcff81d30283f8e Mon Sep 17 00:00:00 2001

From: Jonas Gorski <[email protected]>
Date: Sun, 29 Oct 2017 16:27:21 +0100
Subject: MIPS: AR7: ensure the port type's FCR value is used

From: Jonas Gorski <[email protected]>

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")
Cc Greg Kroah-Hartman <[email protected]>
Cc Yoshihiro YUNOMAE <[email protected]>
Cc Florian Fainelli <[email protected]>
Cc Nicolas Schichan <[email protected]>

Patchwork: https://patchwork.linux-mips.org/patch/17544/

---
 arch/mips/ar7/platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/ar7/platform.c +1 -1
@@ -581,7 +581,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;

Patches currently in stable-queue which might be from [email protected] are

queue-3.18/mips-ar7-ensure-the-port-type-s-fcr-value-is-used.patch