linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 03/24] USB: serial: f81534: fix TIOCGSERIAL implementation
Date: Wed,  7 Apr 2021 12:39:04 +0200	[thread overview]
Message-ID: <20210407103925.829-4-johan@kernel.org> (raw)
In-Reply-To: <20210407103925.829-1-johan@kernel.org>

TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
serial devices is only useful for setting the close_delay and
closing_wait parameters.

The port parameter is used to set the I/O port and does not make any
sense to use for USB serial devices.

The close_delay and closing_wait parameters returned by TIOCGSERIAL are
specified in centiseconds. The driver does not yet support changing
these, but let's report back the default values actually used (0.5 and
30 seconds, respectively).

Fixes: aac1fc386fa1 ("USB: serial: add Fintek F81232 usb to serial driver")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/f81534.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/serial/f81534.c b/drivers/usb/serial/f81534.c
index a763b362f081..c9f90d437e3a 100644
--- a/drivers/usb/serial/f81534.c
+++ b/drivers/usb/serial/f81534.c
@@ -1149,9 +1149,11 @@ static int f81534_get_serial_info(struct tty_struct *tty,
 	port_priv = usb_get_serial_port_data(port);
 
 	ss->type = PORT_16550A;
-	ss->port = port->port_number;
 	ss->line = port->minor;
 	ss->baud_base = port_priv->baud_base;
+	ss->close_delay = 50;
+	ss->closing_wait = 3000;
+
 	return 0;
 }
 
-- 
2.26.3


  parent reply	other threads:[~2021-04-07 10:40 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-07 10:39 [PATCH 00/24] USB: serial: TIOCSSERIAL fixes and generic support Johan Hovold
2021-04-07 10:39 ` [PATCH 01/24] USB: serial: ark3116: fix TIOCGSERIAL implementation Johan Hovold
2021-04-07 10:39 ` [PATCH 02/24] USB: serial: f81232: " Johan Hovold
2021-04-07 10:39 ` Johan Hovold [this message]
2021-04-07 10:39 ` [PATCH 04/24] USB: serial: ftdi_sio: " Johan Hovold
2021-04-07 10:39 ` [PATCH 05/24] USB: serial: io_edgeport: " Johan Hovold
2021-04-07 10:39 ` [PATCH 06/24] USB: serial: io_ti: " Johan Hovold
2021-04-07 10:39 ` [PATCH 07/24] USB: serial: mos7720: " Johan Hovold
2021-04-07 10:39 ` [PATCH 08/24] USB: serial: mos7840: " Johan Hovold
2021-04-07 10:39 ` [PATCH 09/24] USB: serial: opticon: " Johan Hovold
2021-04-07 10:39 ` [PATCH 10/24] USB: serial: pl2303: " Johan Hovold
2021-04-07 10:39 ` [PATCH 11/24] USB: serial: quatech2: " Johan Hovold
2021-04-07 10:39 ` [PATCH 12/24] USB: serial: ssu100: " Johan Hovold
2021-04-07 10:39 ` [PATCH 13/24] USB: serial: ti_usb_3410_5052: " Johan Hovold
2021-04-07 10:39 ` [PATCH 14/24] USB: serial: ti_usb_3410_5052: fix TIOCSSERIAL permission check Johan Hovold
2021-04-07 10:39 ` [PATCH 15/24] USB: serial: usb_wwan: fix TIOCSSERIAL jiffies conversions Johan Hovold
2021-04-07 10:39 ` [PATCH 16/24] USB: serial: usb_wwan: fix unprivileged TIOCCSERIAL Johan Hovold
2021-04-07 10:39 ` [PATCH 17/24] USB: serial: usb_wwan: fix TIOCGSERIAL implementation Johan Hovold
2021-04-07 10:39 ` [PATCH 18/24] USB: serial: whiteheat: " Johan Hovold
2021-04-07 10:39 ` [PATCH 19/24] USB: serial: fix return value for unsupported ioctls Johan Hovold
2021-04-07 10:39 ` [PATCH 20/24] USB: serial: add generic support for TIOCSSERIAL Johan Hovold
2021-04-07 10:39 ` [PATCH 21/24] USB: serial: stop reporting legacy UART types Johan Hovold
2021-04-07 10:39 ` [PATCH 22/24] USB: serial: ftdi_sio: ignore baud_base changes Johan Hovold
2021-04-07 10:39 ` [PATCH 23/24] USB: serial: ftdi_sio: simplify TIOCGSERIAL permission check Johan Hovold
2021-04-07 10:39 ` [PATCH 24/24] USB: serial: ftdi_sio: clean up TIOCSSERIAL Johan Hovold
2021-04-07 15:23 ` [PATCH 00/24] USB: serial: TIOCSSERIAL fixes and generic support 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=20210407103925.829-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).