No need to set latency timeout at every open. This also makes sure that the initial latency at first open after connect is no longer than at consecutive opens (~1ms instead of ~20ms). Signed-off-by: Johan Hovold <jhovold@xxxxxxxxx> --- Hi, I noticed that the initial latency (time before first read callback is made) at first open after connecting the device was longer than for consecutive opens (seems to correspond to the default latency of 16ms rather than the 1ms we set it to). By moving the write_latency_timeout to port probe rather than open, I get the same latencies on all opens. I can't see the reason for setting the timeout at every open rather than just once at port probe either. Are there any reasons for wanting to do so? Note that this patch is independent of (and does not apply cleanly on top of) the "fix initialisation of latency timeout" patch I posted earlier tonight. Thanks, Johan drivers/usb/serial/ftdi_sio.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 9c60d6d..14da287 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1552,6 +1552,7 @@ static int ftdi_sio_port_probe(struct usb_serial_port *port) ftdi_determine_type(port); ftdi_set_max_packet_size(port); read_latency_timer(port); + write_latency_timer(port); create_sysfs_attrs(port); return 0; } @@ -1708,8 +1709,6 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port) priv->tx_bytes = 0; spin_unlock_irqrestore(&priv->tx_lock, flags); - write_latency_timer(port); - /* No error checking for this (will get errors later anyway) */ /* See ftdi_sio.h for description of what is reset */ usb_control_msg(dev, usb_sndctrlpipe(dev, 0), -- 1.6.5.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html