]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: pl2303: fix DTR/RTS being raised on baud rate change
authorJohan Hovold <jhovold@gmail.com>
Fri, 23 Mar 2012 14:23:18 +0000 (15:23 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 22 Apr 2012 22:31:01 +0000 (15:31 -0700)
commit ce5c9851855bab190c9a142761d54ba583ab094c upstream.

DTR/RTS should only be raised when changing baudrate from B0 and not on
any baud rate change (> B0).

Reported-by: Søren Holm <sgh@sgh.dk>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/pl2303.c

index fc2d66f7f4eb0ce3410a066e3877155651398eff..5532ea5f8d759ea50ff4a7e626c4144307b404fd 100644 (file)
@@ -421,7 +421,7 @@ static void pl2303_set_termios(struct tty_struct *tty,
        control = priv->line_control;
        if ((cflag & CBAUD) == B0)
                priv->line_control &= ~(CONTROL_DTR | CONTROL_RTS);
-       else
+       else if ((old_termios->c_cflag & CBAUD) == B0)
                priv->line_control |= (CONTROL_DTR | CONTROL_RTS);
        if (control != priv->line_control) {
                control = priv->line_control;