From: Johan Hovold <johan@kernel.org>
To: linux-usb@vger.kernel.org
Cc: Pho Tran <Pho.Tran@silabs.com>,
linux-kernel@vger.kernel.org, Johan Hovold <johan@kernel.org>
Subject: [PATCH 7/7] USB: serial: cp210x: clean up auto-RTS handling
Date: Mon, 25 Jan 2021 14:48:17 +0100 [thread overview]
Message-ID: <20210125134817.11749-8-johan@kernel.org> (raw)
In-Reply-To: <20210125134817.11749-1-johan@kernel.org>
Clear the RTS bits of the flow-control request before determining the
new value when updating the settings.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/cp210x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index f00b736f3cd3..cc4f63a06f9e 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -1163,9 +1163,9 @@ static void cp210x_set_flow_control(struct tty_struct *tty,
else
ctl_hs |= CP210X_SERIAL_DTR_INACTIVE;
+ flow_repl &= ~CP210X_SERIAL_RTS_MASK;
if (C_CRTSCTS(tty)) {
ctl_hs |= CP210X_SERIAL_CTS_HANDSHAKE;
- flow_repl &= ~CP210X_SERIAL_RTS_MASK;
if (port_priv->rts)
flow_repl |= CP210X_SERIAL_RTS_FLOW_CTL;
else
@@ -1173,7 +1173,6 @@ static void cp210x_set_flow_control(struct tty_struct *tty,
port_priv->crtscts = true;
} else {
ctl_hs &= ~CP210X_SERIAL_CTS_HANDSHAKE;
- flow_repl &= ~CP210X_SERIAL_RTS_MASK;
if (port_priv->rts)
flow_repl |= CP210X_SERIAL_RTS_ACTIVE;
else
--
2.26.2
prev parent reply other threads:[~2021-01-26 6:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-25 13:48 [PATCH 0/7] USB: serial: cp210x: modem-control fixes Johan Hovold
2021-01-25 13:48 ` [PATCH 1/7] USB: serial: cp210x: suppress modem-control errors Johan Hovold
2021-01-25 13:48 ` [PATCH 2/7] USB: serial: cp210x: fix modem-control handling Johan Hovold
2021-01-25 13:48 ` [PATCH 3/7] USB: serial: cp210x: drop shift macros Johan Hovold
2021-01-25 13:48 ` [PATCH 4/7] USB: serial: cp210x: clean up flow-control debug message Johan Hovold
2021-01-25 13:48 ` [PATCH 5/7] USB: serial: cp210x: clean up printk zero padding Johan Hovold
2021-01-25 13:48 ` [PATCH 6/7] USB: serial: cp210x: fix RTS handling Johan Hovold
2021-01-25 13:48 ` Johan Hovold [this message]
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=20210125134817.11749-8-johan@kernel.org \
--to=johan@kernel.org \
--cc=Pho.Tran@silabs.com \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).