diff options
| author | 2019-01-14 13:30:03 +0100 | |
|---|---|---|
| committer | 2019-01-14 14:40:11 +0100 | |
| commit | a8eda9fa1bd84065b75bfa81bf675a7af9055478 (patch) | |
| tree | 941a79177e89f85bae6de6cf2022df85b9902f88 /tools/perf/scripts/python/bin | |
| parent | USB: serial: simple: add Motorola Tetra TPG2200 device id (diff) | |
| download | wireguard-linux-a8eda9fa1bd84065b75bfa81bf675a7af9055478.tar.xz wireguard-linux-a8eda9fa1bd84065b75bfa81bf675a7af9055478.zip | |
USB: serial: ftdi_sio: fix GPIO not working in autosuspend
There is a bug in the current GPIO code for ftdi_sio: it failed to take USB
autosuspend into account. If the device is in autosuspend, calls to
usb_control_msg() fail with -EHOSTUNREACH. Because the standard value for
autosuspend timeout is usually 2-5 seconds, this made it almost impossible
to use the GPIOs on machines that have USB autosuspend enabled. This patch
fixes the issue by acquiring a PM lock on the device for the duration of
the USB transfers. Tested on an FT231X device.
Signed-off-by: Karoly Pados <pados@pados.hu>
[ johan: simplify code somewhat ]
Fixes: ba93cc7da896 ("USB: serial: ftdi_sio: implement GPIO support for FT-X devices")
Cc: stable <stable@vger.kernel.org> # 4.20
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
