mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 15:34:48 +08:00
serial: stm32: Reset .throttled state in .startup()
commitea2624b5b8
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:d1ec8a2eab
("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>
This commit is contained in:
parent
9f9be0ec31
commit
12e9459dda
@ -1077,6 +1077,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)
|
||||
|
Loading…
Reference in New Issue
Block a user