aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ftdi_sio.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2018-05-18 15:25:47 +0200
committerJohan Hovold <johan@kernel.org>2018-05-21 10:03:49 +0200
commit5ada98427f12f5c19d6f93bfe02f23fe4531b978 (patch)
treee91face47f588eabde03dcc8567962c912f34fac /drivers/usb/serial/ftdi_sio.c
parentUSB: serial: use tty_port_register_device() (diff)
downloadlinux-dev-5ada98427f12f5c19d6f93bfe02f23fe4531b978.tar.xz
linux-dev-5ada98427f12f5c19d6f93bfe02f23fe4531b978.zip
USB: serial: ftdi_sio: fix IXON/IXOFF mixup
Since forever this driver has had IXON and IXOFF mixed up, and has used the latter rather than the former to enable hardware-assisted software flow control on output. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r--drivers/usb/serial/ftdi_sio.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 7ea221d42dba..62c99871863c 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -2342,12 +2342,8 @@ no_c_cflag_changes:
} else {
/*
* Xon/Xoff code
- *
- * Check the IXOFF status in the iflag component of the
- * termios structure. If IXOFF is not set, the pre-xon/xoff
- * code is executed.
*/
- if (iflag & IXOFF) {
+ if (iflag & IXON) {
dev_dbg(ddev, "%s request to enable xonxoff iflag=%04x\n",
__func__, iflag);
/* Try to enable the XON/XOFF on the ftdi_sio
@@ -2372,7 +2368,7 @@ no_c_cflag_changes:
}
} else {
/* else clause to only run if cflag ! CRTSCTS and iflag
- * ! XOFF. CHECKME Assuming XON/XOFF handled by tty
+ * ! XON. CHECKME Assuming XON/XOFF handled by tty
* stack - not by device */
dev_dbg(ddev, "%s Turning off hardware flow control\n", __func__);
if (usb_control_msg(dev,