linux/drivers/usb
Johan Hovold 733fff6794 USB: serial: ftdi_sio: fix break and sysrq handling
Only the last NUL in a packet should be flagged as a break character,
for example, to avoid dropping unrelated characters when IGNBRK is set.

Also make sysrq work by consuming the break character instead of having
it immediately cancel the sysrq request, and by not processing it
prematurely to avoid triggering a sysrq based on an unrelated character
received in the same packet (which was received *before* the break).

Note that the break flag can be left set also for a packet received
immediately following a break and that and an ending NUL in such a
packet will continue to be reported as a break as there's no good way to
tell it apart from an actual break.

Tested on FT232R and FT232H.

Fixes: 72fda3ca6f ("USB: serial: ftd_sio: implement sysrq handling on break")
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
2020-07-09 09:19:45 +02:00
..
atm USB: atm: Use the correct style for SPDX License Identifier 2020-03-17 20:03:28 +01:00
c67x00 USB: c67x00: Use the correct style for SPDX License Identifier 2020-03-17 20:03:28 +01:00
cdns3 Merge 5.8-rc3 into usb-next 2020-06-29 08:22:27 +02:00
chipidea USB: ch9: add "USB_" prefix in front of TEST defines 2020-06-24 15:01:24 +02:00
class cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip 2020-06-18 10:42:52 +02:00
common USB: ch9: add "USB_" prefix in front of TEST defines 2020-06-24 15:01:24 +02:00
core Merge 5.8-rc3 into usb-next 2020-06-29 08:22:27 +02:00
dwc2 Merge 5.8-rc3 into usb-next 2020-06-29 08:22:27 +02:00
dwc3 Merge 5.8-rc3 into usb-next 2020-06-29 08:22:27 +02:00
early kdb: Switch to use safer dbg_io_ops over console APIs 2020-06-26 15:40:16 +01:00
gadget Merge 5.8-rc3 into usb-next 2020-06-29 08:22:27 +02:00
host Merge 5.8-rc3 into usb-next 2020-06-29 08:22:27 +02:00
image treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
isp1760 USB: isp1760: Use the correct style for SPDX License Identifier 2020-04-16 14:32:47 +02:00
misc Merge 5.8-rc3 into usb-next 2020-06-29 08:22:27 +02:00
mon USB: mon: Use scnprintf() for avoiding potential buffer overflow 2020-03-12 09:49:28 +01:00
mtu3 USB: ch9: add "USB_" prefix in front of TEST defines 2020-06-24 15:01:24 +02:00
musb USB: ch9: add "USB_" prefix in front of TEST defines 2020-06-24 15:01:24 +02:00
phy usb: phy: tegra: Fix unnecessary check in tegra_usb_phy_probe() 2020-06-24 09:43:16 +03:00
renesas_usbhs usb: renesas_usbhs: getting residue from callback_result 2020-06-24 17:14:44 +02:00
roles usb: roles: Switch on role-switch uevent reporting 2020-05-13 14:20:49 +02:00
serial USB: serial: ftdi_sio: fix break and sysrq handling 2020-07-09 09:19:45 +02:00
storage USB: storage: scsi: fix up comment to be more specific 2020-06-19 08:58:53 +02:00
typec usb: typec: tcpci_rt1711h: avoid screaming irq causing boot hangs 2020-06-18 10:42:53 +02:00
usbip treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00