Skip to content

Commit 15b4743

Browse files
noglitchldesroches
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. Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
1 parent 5da25c6 commit 15b4743

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/tty/serial/atmel_serial.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ static void atmel_stop_tx(struct uart_port *port)
620620
if (((port->rs485.flags & SER_RS485_ENABLED) &&
621621
!(port->rs485.flags & SER_RS485_RX_DURING_TX)) ||
622622
port->iso7816.flags & SER_ISO7816_ENABLED)
623-
atmel_start_rx(port);
623+
if (!atomic_read(&atmel_port->tasklet_shutdown))
624+
atmel_start_rx(port);
625+
624626
}
625627

626628
/*

0 commit comments

Comments
 (0)