From: Oliver Neukum Date: Tue, 26 May 2020 12:44:20 +0000 (+0200) Subject: CDC-ACM: heed quirk also in error handling X-Git-Tag: v5.10.7~2412^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97fe809934dd2b0b37dfef3a2fc70417f485d7af;p=platform%2Fkernel%2Flinux-rpi.git CDC-ACM: heed quirk also in error handling If buffers are iterated over in the error case, the lower limits for quirky devices must be heeded. Signed-off-by: Oliver Neukum Reported-by: Jean Rene Dawin Fixes: a4e7279cd1d19 ("cdc-acm: introduce a cool down") Cc: stable Link: https://lore.kernel.org/r/20200526124420.22160-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index ded8d93..f67088b 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -584,7 +584,7 @@ static void acm_softint(struct work_struct *work) } if (test_and_clear_bit(ACM_ERROR_DELAY, &acm->flags)) { - for (i = 0; i < ACM_NR; i++) + for (i = 0; i < acm->rx_buflimit; i++) if (test_and_clear_bit(i, &acm->urbs_in_error_delay)) acm_submit_read_urb(acm, i, GFP_NOIO); }