summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2021-04-07 12:39:14 +0200
committerJohan Hovold <johan@kernel.org>2021-04-08 09:45:58 +0200
commit4c47dc2a3a00cb288fc4888691227927430e2683 (patch)
tree96f12da4d71ff006b90e1934f11f82e67d906dfe /drivers/usb
parent67a948779067f5b2e4e0c5aa67d010c525c8a0ad (diff)
downloadlinux-stable-4c47dc2a3a00cb288fc4888691227927430e2683.tar.gz
linux-stable-4c47dc2a3a00cb288fc4888691227927430e2683.tar.bz2
linux-stable-4c47dc2a3a00cb288fc4888691227927430e2683.zip
USB: serial: ti_usb_3410_5052: fix TIOCGSERIAL implementation
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 xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds. The driver does not yet support changing close_delay, but let's report back the default value actually used (0.5 seconds). Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index 7252b0ce75a6..4b497c1e850b 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -1406,10 +1406,10 @@ static int ti_get_serial_info(struct tty_struct *tty,
ss->type = PORT_16550A;
ss->line = port->minor;
- ss->port = port->port_number;
- ss->xmit_fifo_size = kfifo_size(&port->write_fifo);
ss->baud_base = tport->tp_tdev->td_is_3410 ? 921600 : 460800;
+ ss->close_delay = 50;
ss->closing_wait = cwait;
+
return 0;
}