Skip to content

Commit

Permalink
cdc-acm: fix BREAK rx code path adding necessary calls
Browse files Browse the repository at this point in the history
commit 08dff27 upstream.

Counting break events is nice but we should actually report them to
the tty layer.

Fixes: 5a6a62b ("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>
  • Loading branch information
oneukum authored and gregkh committed Apr 7, 2021
1 parent d8f5fcc commit 9343cef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/class/cdc-acm.c
Expand Up @@ -313,8 +313,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)
Expand Down

0 comments on commit 9343cef

Please sign in to comment.