From: Johan Hovold <johan@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/4] USB: serial: ti_usb_3410_5052: reduce drain delay to one char
Date: Mon, 12 Apr 2021 11:38:14 +0200 [thread overview]
Message-ID: <20210412093815.736-4-johan@kernel.org> (raw)
In-Reply-To: <20210412093815.736-1-johan@kernel.org>
The three-character drain delay was added by commit f1175daa5312 ("USB:
ti_usb_3410_5052: kill custom closing_wait") when removing the custom
closing-wait implementation, which used a fixed 20 ms poll period and
drain delay.
This was likely a bit too conservative as a one-character timeout (e.g.
33 ms at 300 bps) should be enough to compensate for the lack of a
transmitter empty bit in the TUSB5052 line-status register.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/ti_usb_3410_5052.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 03839289d6c0..8ed64115987f 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -610,7 +610,11 @@ static int ti_port_probe(struct usb_serial_port *port)
usb_set_serial_port_data(port, tport);
- port->port.drain_delay = 3;
+ /*
+ * The TUSB5052 LSR does not tell when the transmitter shift register
+ * has emptied so add a one-character drain delay.
+ */
+ port->port.drain_delay = 1;
return 0;
}
--
2.26.3
next prev parent reply other threads:[~2021-04-12 9:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 9:38 [PATCH 0/4] USB: serial: closing-wait fixes and cleanups Johan Hovold
2021-04-12 9:38 ` [PATCH 1/4] USB: serial: f81232: drop time-based drain delay Johan Hovold
2021-04-12 9:38 ` [PATCH 2/4] USB: serial: io_ti: document reason for " Johan Hovold
2021-04-12 9:38 ` Johan Hovold [this message]
2021-04-12 9:38 ` [PATCH 4/4] USB: serial: ti_usb_3410_5052: drop drain delay for 3410 Johan Hovold
2021-04-12 9:52 ` [PATCH 0/4] USB: serial: closing-wait fixes and cleanups Greg KH
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=20210412093815.736-4-johan@kernel.org \
--to=johan@kernel.org \
--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).