summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Hu <hu1.chen@intel.com>2018-07-27 18:32:41 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-22 07:48:37 +0200
commitb4d2c57717fd0c905a4b8ebd5c534e770aeb93a2 (patch)
tree97ab52b1876ac2bf95e2b2853ac74bca523ab340
parentc2650d43a4dae0a6e678af42d8056a484784f29c (diff)
downloadlinux-stable-b4d2c57717fd0c905a4b8ebd5c534e770aeb93a2.tar.gz
linux-stable-b4d2c57717fd0c905a4b8ebd5c534e770aeb93a2.tar.bz2
linux-stable-b4d2c57717fd0c905a4b8ebd5c534e770aeb93a2.zip
serial: 8250_dw: always set baud rate in dw8250_set_termios
commit dfcab6ba573445c703235ab6c83758eec12d7f28 upstream. dw8250_set_termios() doesn't set baud rate if the arg "old ktermios" is NULL. This happens during resume. Call Trace: ... [ 54.928108] dw8250_set_termios+0x162/0x170 [ 54.928114] serial8250_set_termios+0x17/0x20 [ 54.928117] uart_change_speed+0x64/0x160 [ 54.928119] uart_resume_port ... So the baud rate is not restored after S3 and breaks the apps who use UART, for example, console and bluetooth etc. We address this issue by setting the baud rate irrespective of arg "old", just like the drivers for other 8250 IPs. This is tested with Intel Broxton platform. Signed-off-by: Chen Hu <hu1.chen@intel.com> Fixes: 4e26b134bd17 ("serial: 8250_dw: clock rate handling for all ACPI platforms") Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: stable <stable@vger.kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/8250/8250_dw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 8435c3f204c1..a30d68c4b689 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -224,7 +224,7 @@ static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios,
unsigned int rate;
int ret;
- if (IS_ERR(d->clk) || !old)
+ if (IS_ERR(d->clk))
goto out;
clk_disable_unprepare(d->clk);