Skip to content

Commit 8448625

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 <nicolas.ferre@microchip.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20200210152053.8289-1-nicolas.ferre@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9d69b4a commit 8448625

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/tty/serial/atmel_serial.c

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

503503
if (atmel_uart_is_half_duplex(port))
504-
atmel_start_rx(port);
504+
if (!atomic_read(&atmel_port->tasklet_shutdown))
505+
atmel_start_rx(port);
505506

506507
}
507508

0 commit comments

Comments
 (0)