summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.com>2021-03-11 14:37:14 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-07 12:47:04 +0200
commit5b00c605a81f39fa5cc89f64778443c5eae6620d (patch)
tree4e889b7a6ffbf4ec548de05c04dbfb8bc01c6b8a
parent7d8a40162ebc0f5b8c1aa5cf8e88d35ef97e7f2a (diff)
downloadlinux-rt-5b00c605a81f39fa5cc89f64778443c5eae6620d.tar.gz
cdc-acm: fix BREAK rx code path adding necessary calls
commit 08dff274edda54310d6f1cf27b62fddf0f8d146e upstream. Counting break events is nice but we should actually report them to the tty layer. Fixes: 5a6a62bdb9257 ("cdc-acm: add TIOCMIWAIT") Signed-off-by: Oliver Neukum <oneukum@suse.com> Link: https://lore.kernel.org/r/20210311133714.31881-1-oneukum@suse.com Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/class/cdc-acm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 8d20e4ff1b80..afb35b18a2ce 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -324,8 +324,10 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
acm->iocount.dsr++;
if (difference & ACM_CTRL_DCD)
acm->iocount.dcd++;
- if (newctrl & ACM_CTRL_BRK)
+ if (newctrl & ACM_CTRL_BRK) {
acm->iocount.brk++;
+ tty_insert_flip_char(&acm->port, 0, TTY_BREAK);
+ }
if (newctrl & ACM_CTRL_RI)
acm->iocount.rng++;
if (newctrl & ACM_CTRL_FRAMING)