Received: by 10.223.176.5 with SMTP id f5csp3440002wra; Mon, 29 Jan 2018 13:12:20 -0800 (PST) X-Google-Smtp-Source: AH8x225JRprawDKhQwEXD8p8I8uKznYMHr8pngVjoDtpO7ek3tlQc1V2GH1ysrOuUTidFS88e8BB X-Received: by 2002:a17:902:820c:: with SMTP id x12-v6mr23712998pln.103.1517260340855; Mon, 29 Jan 2018 13:12:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517260340; cv=none; d=google.com; s=arc-20160816; b=hGR6wbzcTDz08+EQmznQJnmxjtA6hCJVVnRqmcwX5ffjOmHi7srofyQ98ybtNRYm60 S37qIiqgXdl1nMBfpmigbpihwGgQspyyfwGWk6WYE5oDy1u+4IXNseU3kcUm4r5wy3an xlYMCd/qBd52/1ci5j8uOWJculWTNLOTtSbrEXUsGIRpuN/9Axu0H3iXXPe7xfaBJSDN Vcuo+SLV1/x5P7UI40RTQO2/ZTVl9mJb/e0HugzZLZMJxt+SdezR9D3IjWr0FK5RHooB 3IUXT8BvMUNY6L1n0EZVu3huf9YEcVUHLkdH7a9Sb0qa9P3NmP9OumQMBNI0/JM71Frr 3cDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=/d9dmZDF41ldzs61x84dqeJVGKpo9fDJmnaGe1JHjt0=; b=PleXGamp3WzV/nml2oJXfCPuqwGa4XFfZDfrSoJpiCzdHlMrM1yMngVc5YQODNXGfT KdX0TQwAAglMtkdII9BMf318zkjoYnXctY8ZMqZ2qTM25QKxk3TGzl9aqQ9yOgikbetL 5BZbZUaokHQX1UdVdSuL2rMQO9RlKHJTX4wvxnpPWntuibObZlRScQXemduKrvQNjqFA ebsj4i8TPlRXA6GJVHo/Dk2zusw6eH55jrVGRSSL11PBEMi0mYrFpesVR0pp8gYLtIAB 8/5ATesxb+5U+mSdOs2swhTaFoPFtb7nsPbkRMPEfOY2YHZoSntwcpdsqSdl8x+kADWx R/tQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l70si12714362pfa.176.2018.01.29.13.12.06; Mon, 29 Jan 2018 13:12:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751963AbeA2VL0 (ORCPT + 99 others); Mon, 29 Jan 2018 16:11:26 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:46732 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752600AbeA2UFv (ORCPT ); Mon, 29 Jan 2018 15:05:51 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4F7732E8F; Mon, 29 Jan 2018 12:58:26 +0000 (UTC) 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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;