On Fri, May 05, 2017 at 05:30:16PM +0200, Anthony Mallet wrote:
> Commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY
> flag") enables unprivileged users to set the FTDI latency timer,
> but there was a logic flaw that skipped sending the corresponding
> USB control message to the device.
>
> Signed-off-by: Anthony Mallet <[email protected]>
Now applied with the following amendment to the commit message:
Specifically, the device latency timer would not be updated until
next open, something which was later also inadvertently broken by
commit c19db4c9e49a ("USB: ftdi_sio: set device latency timeout at
port probe").
A recent commit c6dce2626606 ("USB: serial: ftdi_sio: fix extreme
low-latency setting") disabled the low-latency mode by default so we
now need this fix to allow unprivileged users to again enable it.
and an added stable tag.
> ---
> drivers/usb/serial/ftdi_sio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git drivers/usb/serial/ftdi_sio.c drivers/usb/serial/ftdi_sio.c
> index d38780f..0e634c1 100644
> --- drivers/usb/serial/ftdi_sio.c
> +++ drivers/usb/serial/ftdi_sio.c
> @@ -1527,9 +1527,9 @@ static int set_serial_info(struct tty_struct *tty,
> (new_serial.flags & ASYNC_FLAGS));
> priv->custom_divisor = new_serial.custom_divisor;
>
> +check_and_exit:
> write_latency_timer(port);
>
> -check_and_exit:
> if ((old_priv.flags & ASYNC_SPD_MASK) !=
> (priv->flags & ASYNC_SPD_MASK)) {
> if ((priv->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html