Hi Lukas Thanks for your patch. Hope you haven't lost much time debugging it. Your patch looks good to me. I would only replace "nonsensical" with "invalid" on the subject of the patch. Regards On Tue, Oct 24, 2017 at 8:37 PM, Lukas Wunner <lukas@xxxxxxxxx> wrote: > This driver's ->rs485_config callback checks if SER_RS485_RTS_ON_SEND > and SER_RS485_RTS_AFTER_SEND have the same value. If they do, it means > the user has passed in nonsensical data with the TIOCSRS485 ioctl() > since RTS must have a different polarity when sending and when not > sending. In this case, rs485 mode is not enabled (the RS485_URA bit > is not set in the RS485 Enable Register) and this is supposed to be > signaled back to the user by clearing the SER_RS485_ENABLED bit in > struct serial_rs485 ... except a missing tilde character is preventing > that from happening. > > Fixes: 28e3fb6c4dce ("serial: Add support for Fintek F81216A LPC to 4 UART") > Cc: Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx> > Cc: "Ji-Ze Hong (Peter Hong)" <hpeter@xxxxxxxxx> > Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx> > --- > drivers/tty/serial/8250/8250_fintek.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/8250/8250_fintek.c b/drivers/tty/serial/8250/8250_fintek.c > index b346239..c41cbb5 100644 > --- a/drivers/tty/serial/8250/8250_fintek.c > +++ b/drivers/tty/serial/8250/8250_fintek.c > @@ -221,7 +221,7 @@ static int fintek_8250_rs485_config(struct uart_port *port, > > if ((!!(rs485->flags & SER_RS485_RTS_ON_SEND)) == > (!!(rs485->flags & SER_RS485_RTS_AFTER_SEND))) > - rs485->flags &= SER_RS485_ENABLED; > + rs485->flags &= ~SER_RS485_ENABLED; > else > config |= RS485_URA; > > -- > 2.11.0 > -- Ricardo Ribalda -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html