diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2024-04-17 12:03:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-27 18:12:59 +0300 |
commit | 987639d6d8793450faf79e3ffa4ab0b9cd52598b (patch) | |
tree | 0053c1b08ac10a9104873381fd8f4e69bf964c97 | |
parent | 88115405eb8689888eb90dfe20415e88e72482d5 (diff) | |
download | linux-987639d6d8793450faf79e3ffa4ab0b9cd52598b.tar.xz |
serial: stm32: Reset .throttled state in .startup()
commit ea2624b5b829b8f93c0dce25721d835969b34faf upstream.
When an UART is opened that still has .throttled set from a previous
open, the RX interrupt is enabled but the irq handler doesn't consider
it. This easily results in a stuck irq with the effect to occupy the CPU
in a tight loop.
So reset the throttle state in .startup() to ensure that RX irqs are
handled.
Fixes: d1ec8a2eabe9 ("serial: stm32: update throttle and unthrottle ops for dma mode")
Cc: stable@vger.kernel.org
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/a784f80d3414f7db723b2ec66efc56e1ad666cbf.1713344161.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/stm32-usart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index 7ea569c681c9..d103b07d10ee 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -1088,6 +1088,7 @@ static int stm32_usart_startup(struct uart_port *port) val |= USART_CR2_SWAP; writel_relaxed(val, port->membase + ofs->cr2); } + stm32_port->throttled = false; /* RX FIFO Flush */ if (ofs->rqr != UNDEF_REG) |