]> git.baikalelectronics.ru Git - kernel.git/commit
serial: 8250_dw: Store LSR into lsr_saved_flags in dw8250_tx_wait_empty()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 8 Jun 2022 09:54:31 +0000 (12:54 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:01 +0000 (11:18 +0200)
commit4e015f7431ca96711eb3f2e793e4e7f786646141
treef30a0548eb76ca07d2e58e6e8db4aaac89df8c17
parent9d03aecfb98db15ce04a44c6e627765a1f739ad8
serial: 8250_dw: Store LSR into lsr_saved_flags in dw8250_tx_wait_empty()

[ Upstream commit 94f569517c2620e19d0ff2ad90f705704dfad950 ]

Make sure LSR flags are preserved in dw8250_tx_wait_empty(). This
function is called from a low-level out function and therefore cannot
call serial_lsr_in() as it would lead to infinite recursion.

It is borderline if the flags need to be saved here at all since this
code relates to writing LCR register which usually implies no important
characters should be arriving.

Fixes: 76fea4d3f8bc ("serial: 8250_dw: Allow TX FIFO to drain before writing to UART_LCR")
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220608095431.18376-7-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/8250/8250_dw.c