diff options
author | Johan Hovold <johan@kernel.org> | 2018-05-18 09:25:47 -0400 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2018-05-21 04:03:49 -0400 |
commit | 5ada98427f12f5c19d6f93bfe02f23fe4531b978 (patch) | |
tree | e91face47f588eabde03dcc8567962c912f34fac /drivers/usb/serial/ftdi_sio.c | |
parent | 79ef51894a8dfbd7c4db1d2a820c235b42499e2e (diff) |
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.c | 8 |
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: | |||
2342 | } else { | 2342 | } else { |
2343 | /* | 2343 | /* |
2344 | * Xon/Xoff code | 2344 | * Xon/Xoff code |
2345 | * | ||
2346 | * Check the IXOFF status in the iflag component of the | ||
2347 | * termios structure. If IXOFF is not set, the pre-xon/xoff | ||
2348 | * code is executed. | ||
2349 | */ | 2345 | */ |
2350 | if (iflag & IXOFF) { | 2346 | if (iflag & IXON) { |
2351 | dev_dbg(ddev, "%s request to enable xonxoff iflag=%04x\n", | 2347 | dev_dbg(ddev, "%s request to enable xonxoff iflag=%04x\n", |
2352 | __func__, iflag); | 2348 | __func__, iflag); |
2353 | /* Try to enable the XON/XOFF on the ftdi_sio | 2349 | /* Try to enable the XON/XOFF on the ftdi_sio |
@@ -2372,7 +2368,7 @@ no_c_cflag_changes: | |||
2372 | } | 2368 | } |
2373 | } else { | 2369 | } else { |
2374 | /* else clause to only run if cflag ! CRTSCTS and iflag | 2370 | /* else clause to only run if cflag ! CRTSCTS and iflag |
2375 | * ! XOFF. CHECKME Assuming XON/XOFF handled by tty | 2371 | * ! XON. CHECKME Assuming XON/XOFF handled by tty |
2376 | * stack - not by device */ | 2372 | * stack - not by device */ |
2377 | dev_dbg(ddev, "%s Turning off hardware flow control\n", __func__); | 2373 | dev_dbg(ddev, "%s Turning off hardware flow control\n", __func__); |
2378 | if (usb_control_msg(dev, | 2374 | if (usb_control_msg(dev, |