Skip to contentSkip to conversation

patch "serial: 8250_dw: always set baud rate in dw8250_set_termios" added to tty-next

PATCH [email protected] 1 participant 1 message Aug 2, 2018

Subsystems (4)
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

serial: 8250_dw: always set baud rate in dw8250_set_termios

to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-next branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will also be merged in the next major kernel release during the merge window.

If you have any questions about this process, please let me know.

Quoted 1 line

From dfcab6ba573445c703235ab6c83758eec12d7f28 Mon Sep 17 00:00:00 2001

From: Chen Hu <[email protected]>
Date: Fri, 27 Jul 2018 18:32:41 +0800
Subject: serial: 8250_dw: always set baud rate in dw8250_set_termios

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.

Fixes 4e26b134bd17 ("serial: 8250_dw: clock rate handling for all ACPI platforms")
Cc Heikki Krogerus <[email protected]>
Cc stable <[email protected]>
---
 drivers/tty/serial/8250/8250_dw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/8250/8250_dw.c +1 -1
index b4e6f31936f5..27b7ecc3b59b 100644
@@ -310,7 +310,7 @@ static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios,
 	long rate;
 	int ret;
 
-	if (IS_ERR(d->clk) || !old)
+	if (IS_ERR(d->clk))
 		goto out;
 
 	clk_disable_unprepare(d->clk);
Signature · 1 line
2.18.0