Skip to content

Commit 671ea19

Browse files
noglitchgregkh
authored andcommitted
tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode
commit 04b5bfe upstream. In atmel_shutdown() we call atmel_stop_rx() and atmel_stop_tx() functions. Prevent the rx restart that is implemented in RS485 or ISO7816 modes when calling atmel_stop_tx() by using the atomic information tasklet_shutdown that is already in place for this purpose. Fixes: 98f2082 ("tty/serial: atmel: enforce tasklet init and termination sequences") Signed-off-by: Nicolas Ferre <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5ae6e56 commit 671ea19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/tty/serial/atmel_serial.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,8 @@ static void atmel_stop_tx(struct uart_port *port)
574574
atmel_uart_writel(port, ATMEL_US_IDR, atmel_port->tx_done_mask);
575575

576576
if (atmel_uart_is_half_duplex(port))
577-
atmel_start_rx(port);
577+
if (!atomic_read(&atmel_port->tasklet_shutdown))
578+
atmel_start_rx(port);
578579

579580
}
580581

0 commit comments

Comments
 (0)