Skip to content

Commit 6807593

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 f4e6d51 commit 6807593

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

492492
if (atmel_uart_is_half_duplex(port))
493-
atmel_start_rx(port);
493+
if (!atomic_read(&atmel_port->tasklet_shutdown))
494+
atmel_start_rx(port);
494495

495496
}
496497

0 commit comments

Comments
 (0)