USB: serial: cp210x: fix hardware flow-control disable
authorKonstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
Wed, 4 May 2016 21:56:52 +0000 (16:56 -0500)
committerJohan Hovold <johan@kernel.org>
Thu, 5 May 2016 09:27:02 +0000 (11:27 +0200)
A bug in the CRTSCTS handling caused RTS to alternate between

CRTSCTS=0 => "RTS is transmit active signal" and
CRTSCTS=1 => "RTS is used for receive flow control"

instead of

CRTSCTS=0 => "RTS is statically active" and
CRTSCTS=1 => "RTS is used for receive flow control"

This only happened after first having enabled CRTSCTS.

Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control")
Cc: stable <stable@vger.kernel.org>
[johan: reword commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/cp210x.c

index dd47823bb014c4664fed94181b33fbcd5f8d6e85..fef7a512bff40f4bcd3c7f5b7166646a9bb4041a 100644 (file)
@@ -967,8 +967,7 @@ static void cp210x_set_termios(struct tty_struct *tty,
                } else {
                        modem_ctl[0] &= ~0x7B;
                        modem_ctl[0] |= 0x01;
-                       /* FIXME - OR here instead of assignment looks wrong */
-                       modem_ctl[4] |= 0x40;
+                       modem_ctl[4] = 0x40;
                        dev_dbg(dev, "%s - flow control = NONE\n", __func__);
                }
 
This page took 0.02559 seconds and 5 git commands to generate.