From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:42978 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751884AbbEBRDw (ORCPT ); Sat, 2 May 2015 13:03:52 -0400 Subject: Patch "serial: 8250: Check UART_SCR is writable" has been added to the 4.0-stable tree To: peter@hurleysoftware.com, gregkh@linuxfoundation.org, slash.tmp@free.fr Cc: , From: Date: Sat, 02 May 2015 19:01:24 +0200 Message-ID: <14305860842588@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled serial: 8250: Check UART_SCR is writable to the 4.0-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: serial-8250-check-uart_scr-is-writable.patch and it can be found in the queue-4.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From f01a0bd8921b9d6668d41fae3198970e6318f532 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Mon, 9 Mar 2015 14:05:01 -0400 Subject: serial: 8250: Check UART_SCR is writable From: Peter Hurley commit f01a0bd8921b9d6668d41fae3198970e6318f532 upstream. Au1x00/RT2800+ doesn't implement the 8250 scratch register (and this may be true of other h/w currently supported by the 8250 driver); read back the canary value written to the scratch register to enable the console h/w restart after resume from system suspend. Fixes: 4516d50aabedb ("serial: 8250: Use canary to restart console ...") Reported-by: Mason Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -3444,7 +3444,8 @@ void serial8250_suspend_port(int line) port->type != PORT_8250) { unsigned char canary = 0xa5; serial_out(up, UART_SCR, canary); - up->canary = canary; + if (serial_in(up, UART_SCR) == canary) + up->canary = canary; } uart_suspend_port(&serial8250_reg, port); Patches currently in stable-queue which might be from peter@hurleysoftware.com are queue-4.0/serial-8250-check-uart_scr-is-writable.patch