Skip to content

Commit dfcab6b

Browse files
chen-hu-97gregkh
authored andcommitted
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. Signed-off-by: Chen Hu <[email protected]> Fixes: 4e26b13 ("serial: 8250_dw: clock rate handling for all ACPI platforms") Cc: Heikki Krogerus <[email protected]> Cc: stable <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bfbf2de commit dfcab6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/8250/8250_dw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ static void dw8250_set_termios(struct uart_port *p, struct ktermios *termios,
310310
long rate;
311311
int ret;
312312

313-
if (IS_ERR(d->clk) || !old)
313+
if (IS_ERR(d->clk))
314314
goto out;
315315

316316
clk_disable_unprepare(d->clk);

0 commit comments

Comments
 (0)