Skip to content

Commit

Permalink
USB: cdc-acm: fix break reporting
Browse files Browse the repository at this point in the history
commit 58fc1da upstream.

A recent change that started reporting break events forgot to push the
event to the line discipline, which meant that a detected break would
not be reported until further characters had been receive (the port
could even have been closed and reopened in between).

Fixes: 08dff27 ("cdc-acm: fix BREAK rx code path adding necessary calls")
Cc: stable@vger.kernel.org
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210929090937.7410-3-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jhovold authored and gregkh committed Oct 13, 2021
1 parent fc8b3e8 commit feb3fe7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/usb/class/cdc-acm.c
Expand Up @@ -340,6 +340,9 @@ static void acm_process_notification(struct acm *acm, unsigned char *buf)
acm->iocount.overrun++;
spin_unlock_irqrestore(&acm->read_lock, flags);

if (newctrl & ACM_CTRL_BRK)
tty_flip_buffer_push(&acm->port);

if (difference)
wake_up_all(&acm->wioctl);

Expand Down

0 comments on commit feb3fe7

Please sign in to comment.