All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Subject: [1/4] USB: serial: ftdi_sio: fix IXON/IXOFF mixup
Date: Fri, 18 May 2018 15:25:47 +0200	[thread overview]
Message-ID: <20180518132550.21749-2-johan@kernel.org> (raw)

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.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/ftdi_sio.c | 8 ++------
 1 file 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 @@ static void ftdi_set_termios(struct tty_struct *tty,
 	} 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 @@ static void ftdi_set_termios(struct tty_struct *tty,
 			}
 		} 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,

             reply	other threads:[~2018-05-18 13:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 13:25 Johan Hovold [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-05-18 13:53 [1/4] USB: serial: ftdi_sio: fix IXON/IXOFF mixup Greg Kroah-Hartman
2018-05-18 14:33 Johan Hovold
2018-05-18 14:53 Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180518132550.21749-2-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.