Skip to content

Commit c31c3ea

Browse files
Erwan Le Raygregkh
authored andcommitted
serial: stm32: update transmission complete error message in shutdown
The transmission complete error message provides the status of the ISR_USART_TC bit. This bit, when set, indicates that the transmission has not been completed. The bit status indication is not a very understandable information. The error message sent on console should indicate that the transmission is not complete, instead of providing USART_TC bit status. Update the error message and add a comment for better understanding. Signed-off-by: Erwan Le Ray <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 97f3a08 commit c31c3ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/tty/serial/stm32-usart.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,8 +687,9 @@ static void stm32_usart_shutdown(struct uart_port *port)
687687
isr, (isr & USART_SR_TC),
688688
10, 100000);
689689

690+
/* Send the TC error message only when ISR_TC is not set */
690691
if (ret)
691-
dev_err(port->dev, "transmission complete not set\n");
692+
dev_err(port->dev, "Transmission is not complete\n");
692693

693694
stm32_usart_clr_bits(port, ofs->cr1, val);
694695

0 commit comments

Comments
 (0)