diff options
Diffstat (limited to 'recipes-kernel/linux/linux-at91-5.4.81')
-rw-r--r-- | recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch b/recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch new file mode 100644 index 0000000..d17ed37 --- /dev/null +++ b/recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch @@ -0,0 +1,23 @@ +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 --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c +index 28d4a92c0d63..2d17558a807d 100644 +--- a/drivers/tty/serial/atmel_serial.c ++++ b/drivers/tty/serial/atmel_serial.c +@@ -2250,6 +2250,9 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios, + 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 (port->iso7816.flags & SER_ISO7816_ENABLED) { + atmel_uart_writel(port, ATMEL_US_TTGR, port->iso7816.tg); + /* select mck clock, and output */ +-- +2.25.1 + |