diff options
author | Greg Kroah-Hartman | 2021-10-11 07:39:38 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2021-10-11 07:39:38 +0200 |
commit | 620b74d01b9d4393bef6742bf121908322c2fe0b (patch) | |
tree | 507ab81bf701a1500b617526afa4232a0634a206 /drivers/usb/class/cdc-acm.c | |
parent | c326d3ed52c8b47f0de329b3b213dc32409d3656 (diff) | |
parent | 64570fbc14f8d7cb3fe3995f20e26bc25ce4b2cc (diff) |
Merge 5.15-rc5 into usb-next
We need the USB fixes in here as well.
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 1a84b24d199f..b3ce7338cb6b 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); } |