]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: ftdi_sio: fix setting latency for unprivileged users
authorAnthony Mallet <anthony.mallet@laas.fr>
Fri, 5 May 2017 15:30:16 +0000 (17:30 +0200)
committerJohan Hovold <johan@kernel.org>
Mon, 15 May 2017 08:20:25 +0000 (10:20 +0200)
commit6b23c77ecb7343d09ca53260c4d7b01f6053e4e5
treea74ba6fee7cbe72444cd73b2f2aed2ed47b11ff2
parent6e4463741d3ecf208fdf4395738411742657618a
USB: serial: ftdi_sio: fix setting latency for unprivileged users

Commit f95cbd4c6bf6 ("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.

Specifically, the device latency timer would not be updated until next
open, something which was later also inadvertently broken by commit
f99a2609e0c2 ("USB: ftdi_sio: set device latency timeout at port
probe").

A recent commit 0846c9aa738f ("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.

Signed-off-by: Anthony Mallet <anthony.mallet@laas.fr>
[johan: amend commit message]
Fixes: f95cbd4c6bf6 ("ft232: support the ASYNC_LOW_LATENCY flag")
Fixes: f99a2609e0c2 ("USB: ftdi_sio: set device latency timeout at port probe").
Cc: stable <stable@vger.kernel.org> # 2.6.31
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ftdi_sio.c