This patch allows RS485 Half Duplex (ATMEL_US_USMODE_RS485 is half duplex) to work even if handshaking is turned on. This mimics the behavior of the EXAR USB/Serial driver known as Vizzini. It is impossible to use handshaking when using ATMEL_US_USMODE_RS485. This provides compatibility between MTCDT-0.1 and MTCDT-0.2. ======================================================================================= diff -Naru orig/drivers/tty/serial/atmel_serial.c new/drivers/tty/serial/atmel_serial.c --- orig/drivers/tty/serial/atmel_serial.c 2021-11-29 12:29:38.472076748 -0600 +++ new/drivers/tty/serial/atmel_serial.c 2021-11-29 12:26:05.668072459 -0600 @@ -2171,7 +2171,10 @@ atmel_uart_writel(port, ATMEL_US_TTGR, port->rs485.delay_rts_after_send); mode |= ATMEL_US_USMODE_RS485; + /* CRTSCTS is impossible in RS485 mode, and breaks the driver + * so we cannot do a send. */ + termios->c_cflag &= ~CRTSCTS; } else if (termios->c_cflag & CRTSCTS) { /* RS232 with hardware handshake (RTS/CTS) */ if (atmel_use_fifo(port) && !mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS)) {