Skip to content

Commit 04b5bfe

Browse files
noglitchgregkh
authored andcommitted
tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode
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 0c5aae5 commit 04b5bfe

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
@@ -570,7 +570,8 @@ static void atmel_stop_tx(struct uart_port *port)
570570
atmel_uart_writel(port, ATMEL_US_IDR, atmel_port->tx_done_mask);
571571

572572
if (atmel_uart_is_half_duplex(port))
573-
atmel_start_rx(port);
573+
if (!atomic_read(&atmel_port->tasklet_shutdown))
574+
atmel_start_rx(port);
574575

575576
}
576577

0 commit comments

Comments
 (0)