Skip to contentSkip to conversation

CDC-ACM: heed quirk also in error handling

PATCH In review Oliver Neukum 2 participants 2 messages May 26, 2020 – May 27, 2020

Subsystems (2)
lore
Share & tools
lore

Oliver Neukum

author maintainer
#0 lore raw

PATCH 1/1 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.

Fixes a4e7279cd1d19 ("cdc-acm: introduce a cool down")
---
 drivers/usb/class/cdc-acm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/class/cdc-acm.c +1 -1
index 7678ae4afd53..be4543569822 100644
@@ -585,7 +585,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);
 	}
Signature · 1 line
2.16.4
maintainer
#1 lore raw
Quoted 16 lines · Oliver Neukum

If buffers are iterated over in the error case, the lower limits for quirky devices must be heeded.

Fixes a4e7279cd1d19 ("cdc-acm: introduce a cool down")
Cc stable <[email protected]>
---
 drivers/usb/class/cdc-acm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/class/cdc-acm.c +0 -0
index 7678ae4afd53..be4543569822 100644

drivers/usb/class/cdc-acm.c static void acm_softint(struct work_struct *work) · line 588

Quoted 5 lines
drivers/usb/class/cdc-acm.c +1 -1
@@ -585,7 +585,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++) 

Trailing whitespace :(

I'll go fix it up by hand...

greg k-h