Skip to content

Commit ea2624b

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
serial: stm32: Reset .throttled state in .startup()
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: d1ec8a2 ("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>
1 parent 13c7853 commit ea2624b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/tty/serial/stm32-usart.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ static int stm32_usart_startup(struct uart_port *port)
10921092
val |= USART_CR2_SWAP;
10931093
writel_relaxed(val, port->membase + ofs->cr2);
10941094
}
1095+
stm32_port->throttled = false;
10951096

10961097
/* RX FIFO Flush */
10971098
if (ofs->rqr != UNDEF_REG)

0 commit comments

Comments
 (0)