diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:29:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-18 09:29:27 +0200 |
commit | 22d4f9beaf32a7cda9edeafdf5e99bec3de32c51 (patch) | |
tree | 37fd192452ba853e740d4b8c3fa0f171dc2b8d33 /drivers/usb/class/cdc-acm.c | |
parent | d0221a780cbc99fec6c27a98dba2828dc5735c00 (diff) | |
parent | 519d81956ee277b4419c723adfb154603c2565ba (diff) | |
download | linux-22d4f9beaf32a7cda9edeafdf5e99bec3de32c51.tar.gz linux-22d4f9beaf32a7cda9edeafdf5e99bec3de32c51.tar.bz2 linux-22d4f9beaf32a7cda9edeafdf5e99bec3de32c51.zip |
Merge 5.15-rc6 into char-misc-next
We need the char/misc fixes in here for merging and testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 4e2f1552f4b7..7b2e2420ecae 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -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); @@ -475,11 +478,16 @@ static int acm_submit_read_urbs(struct acm *acm, gfp_t mem_flags) static void acm_process_read_urb(struct acm *acm, struct urb *urb) { + unsigned long flags; + if (!urb->actual_length) return; + spin_lock_irqsave(&acm->read_lock, flags); tty_insert_flip_string(&acm->port, urb->transfer_buffer, urb->actual_length); + spin_unlock_irqrestore(&acm->read_lock, flags); + tty_flip_buffer_push(&acm->port); } |