diff options
| author | Oliver Neukum <[email protected]> | 2021-03-11 13:37:14 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2021-03-23 12:25:41 +0000 |
| commit | 08dff274edda54310d6f1cf27b62fddf0f8d146e (patch) | |
| tree | 190cbc9f141990ebefc9f2f072a1fb83b0e198e2 /drivers/usb/class/cdc-acm.c | |
| parent | usb: gadget: udc: amd5536udc_pci fix null-ptr-dereference (diff) | |
| download | kernel-08dff274edda54310d6f1cf27b62fddf0f8d146e.tar.gz kernel-08dff274edda54310d6f1cf27b62fddf0f8d146e.zip | |
cdc-acm: fix BREAK rx code path adding necessary calls
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
| -rw-r--r-- | drivers/usb/class/cdc-acm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 39ddb5585ded..b013671261a2 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -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) |
