android_kernel_oneplus_msm8998/drivers/tty/serial/8250
Chen Hu b4d2c57717 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: 4e26b134bd ("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>
2018-08-22 07:48:37 +02:00
..
8250.h serial: 8250: move rx_running out of the bitfield 2015-08-14 17:19:50 -07:00
8250_accent.c
8250_acorn.c
8250_boca.c
8250_core.c serial: don't register CIR serial ports 2015-10-04 17:23:52 +01:00
8250_dma.c TTY/Serial driver patches for 4.4-rc1 2015-11-04 21:35:12 -08:00
8250_dw.c serial: 8250_dw: always set baud rate in dw8250_set_termios 2018-08-22 07:48:37 +02:00
8250_early.c serial: 8250: Add OF earlycon support 2015-10-04 17:49:27 +01:00
8250_em.c serial: 8250: remove the redundant include 2015-03-26 22:21:08 +01:00
8250_exar_st16c554.c
8250_fintek.c serial: 8250_fintek: Fix rs485 disablement on invalid ioctl() 2017-12-09 18:42:39 +01:00
8250_fourport.c
8250_fsl.c serial: export fsl8250_handle_irq 2015-11-20 16:19:54 -08:00
8250_gsc.c
8250_hp300.c serial: 8250: remove the redundant include 2015-03-26 22:21:08 +01:00
8250_hub6.c
8250_ingenic.c serial: 8250_ingenic: Enable FIFO for Ingenic UARTs 2015-10-04 17:47:49 +01:00
8250_lpc18xx.c serial: 8250: add LPC18xx/43xx UART driver 2015-06-01 06:56:33 +09:00
8250_mid.c serial: 8250_mid: fix divide error bug if baud rate is 0 2016-09-24 10:07:38 +02:00
8250_mtk.c tty: serial/8250: remove console dependency for mediatek 2015-05-24 13:06:09 -07:00
8250_omap.c serial: 8250: omap: Disable DMA for console UART 2018-04-13 19:50:07 +02:00
8250_pci.c serial: 8250_pci: Add Brainboxes UC-260 4 port serial device 2018-03-18 11:17:53 +01:00
8250_pnp.c serial: 8250: bind to ALi Fast Infrared Controller (ALI5123) 2015-08-14 17:13:19 -07:00
8250_port.c serial: 8250: Preserve DLD[7:4] for PORT_XR17V35X 2017-12-09 18:42:40 +01:00
8250_uniphier.c serial: 8250_uniphier: fix dl_read and dl_write functions 2015-12-12 21:42:31 -08:00
Kconfig serial: 8250_mid: fix broken DMA dependency 2018-02-25 11:03:49 +01:00
Makefile serial: 8250_pci: Intel MID UART support to its own driver 2015-10-17 21:18:38 -07:00
serial_cs.c