mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 00:46:55 +07:00
serial: stm32: fix transmit_chars when tx is stopped
Disables the tx irq when the transmission is ended and updates stop_tx
conditions for code cleanup.
Fixes: 48a6092fb4
("serial: stm32-usart: Add STM32 USART Driver")
Signed-off-by: Erwan Le Ray <erwan.leray@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6c5962f30b
commit
b83b957c91
@ -420,13 +420,8 @@ static void stm32_transmit_chars(struct uart_port *port)
|
||||
return;
|
||||
}
|
||||
|
||||
if (uart_tx_stopped(port)) {
|
||||
stm32_stop_tx(port);
|
||||
return;
|
||||
}
|
||||
|
||||
if (uart_circ_empty(xmit)) {
|
||||
stm32_stop_tx(port);
|
||||
if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
|
||||
stm32_clr_bits(port, ofs->cr1, USART_CR1_TXEIE);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -439,7 +434,7 @@ static void stm32_transmit_chars(struct uart_port *port)
|
||||
uart_write_wakeup(port);
|
||||
|
||||
if (uart_circ_empty(xmit))
|
||||
stm32_stop_tx(port);
|
||||
stm32_clr_bits(port, ofs->cr1, USART_CR1_TXEIE);
|
||||
}
|
||||
|
||||
static irqreturn_t stm32_interrupt(int irq, void *ptr)
|
||||
|
Loading…
Reference in New Issue
Block a user