]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
USB: serial: ftdi_sio: fix line-status over-reporting
authorJohan Hovold <johan@kernel.org>
Thu, 2 Feb 2017 16:38:35 +0000 (17:38 +0100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 6 Apr 2017 08:20:05 +0000 (09:20 +0100)
commit9dd33a416be9474f58195b79cad09b65d95d15d4
tree4fe6259887aff21df405150efffa4098eab262ee
parent391734765a4e27aba9cba582d4dfef8b8b830647
USB: serial: ftdi_sio: fix line-status over-reporting

BugLink: http://bugs.launchpad.net/bugs/1669016
commit a6bb1e17a39818b01b55d8e6238b4b5f06d55038 upstream.

FTDI devices use a receive latency timer to periodically empty the
receive buffer and report modem and line status (also when the buffer is
empty).

When a break or error condition is detected the corresponding status
flags will be set on a packet with nonzero data payload and the flags
are not updated until the break is over or further characters are
received.

In order to avoid over-reporting break and error conditions, these flags
must therefore only be processed for packets with payload.

This specifically fixes the case where after an overrun, the error
condition is continuously reported and NULL-characters inserted until
further data is received.

Reported-by: Michael Walle <michael@walle.cc>
Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on
break")
Fixes: 166ceb690750 ("USB: ftdi_sio: clean up line-status handling")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/usb/serial/ftdi_sio.c