From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227XIG1DYV+4TvHoGfc32lpld1dDSPOFYDoioteYhjdxRumeDEqE26MWvHs/EsQH8V2eLjmA ARC-Seal: i=1; a=rsa-sha256; t=1517256352; cv=none; d=google.com; s=arc-20160816; b=D8gnVbH/vlEOX3EZ9BbyvdfaWpOKB2hvUWw00zpAHuMTVTFc59hDQJ7MqKafPNb0fG 31kvsny99NWe/Cyv5LOsyIyWgliczLAfScsh1Tnbxl0AQpsDnwHSgFp9wlN+TTZKcboT 9TgFRf3PeK8fpOx0S1gHCRtwoodHa3bJXxOugEr8jJr0yeEkHhyDJrNQdmTOnncOE3Ae i8/RSEIh0TDwOxiy/hokDrfzReD/XFdlQPgRWSc1HXghDtQO8f7Dl8aTPaVeQC8t5K6k CCrq4zX/JroxS++08UVy7FQKhb5fDPmMcDQjH5w6Hs5A08UjxgyAyXeWo52txuKOm8rD FFhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=/d9dmZDF41ldzs61x84dqeJVGKpo9fDJmnaGe1JHjt0=; b=nk9zgW1aj3MKmYLguusNzGUqwgaE4SKHIJDRyBA2L2gfvX8WCQQ0qQRAk3kgwrCPes 8RkjF9W3aaWdI8iO2L2Z0AmDSrX1QRFXn583pw199XLmLx4FC1TnuBZqYvfCfRtmPH5e Fe0IM+2zdaKRfyLpPQ7s71dJZACOIGt4AC5OboMC4A1+JbFshmYLhNjCphSd5Ast7LS4 0upJHLDAWf1ZE2U7V1vo+RFjOlALrx1SJvp+WvmqsBwrU0mgdKiXPC+RgM6f1TmGGQHH jepgaHtnTDVaHfu8StA0K1hVBF+zfBpHuF1mggfvDKuGZ0iXAqBIVNRAj3XxyIEerczs sO5g== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonas Gorski , Yoshihiro YUNOMAE , Florian Fainelli , Nicolas Schichan , linux-mips@linux-mips.org, linux-serial@vger.kernel.org, Ralf Baechle , James Hogan Subject: [PATCH 3.18 19/52] MIPS: AR7: ensure the port types FCR value is used Date: Mon, 29 Jan 2018 13:56:37 +0100 Message-Id: <20180129123629.035172662@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180129123628.168904217@linuxfoundation.org> References: <20180129123628.168904217@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1590958596725414539?= X-GMAIL-MSGID: =?utf-8?q?1590958596725414539?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jonas Gorski 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 Cc: Greg Kroah-Hartman Cc: Yoshihiro YUNOMAE Cc: Florian Fainelli Cc: Nicolas Schichan 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 Cc: James Hogan Signed-off-by: Greg Kroah-Hartman --- 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 @@ -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;