Commit c19db4c9 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: ftdi_sio: set device latency timeout at port probe

No need to set latency timeout at every open.

This also fixes an issue with the read latency being as high as 250ms
(instead of 1ms) for the first read after port probe.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3ed78011
...@@ -1589,6 +1589,7 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) ...@@ -1589,6 +1589,7 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port)
ftdi_set_max_packet_size(port); ftdi_set_max_packet_size(port);
if (read_latency_timer(port) < 0) if (read_latency_timer(port) < 0)
priv->latency = 16; priv->latency = 16;
write_latency_timer(port);
create_sysfs_attrs(port); create_sysfs_attrs(port);
return 0; return 0;
} }
...@@ -1717,8 +1718,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) ...@@ -1717,8 +1718,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
dbg("%s", __func__); dbg("%s", __func__);
write_latency_timer(port);
/* No error checking for this (will get errors later anyway) */ /* No error checking for this (will get errors later anyway) */
/* See ftdi_sio.h for description of what is reset */ /* See ftdi_sio.h for description of what is reset */
usb_control_msg(dev, usb_sndctrlpipe(dev, 0), usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment