Skip to content

Commit 19342b6

Browse files
Felipe BalbiJiri Slaby
Felipe Balbi
authored and
Jiri Slaby
committed
usb: gadget: function: acm: make f_acm pass USB20CV Chapter9
[ Upstream commit 52ec49a ] During Halt Endpoint Test, our interrupt endpoint will be disabled, which will clear out ep->desc to NULL. Unless we call config_ep_by_speed() again, we will not be able to enable this endpoint which will make us fail that test. Fixes: f9c56cd (usb: gadget: Clear usb_endpoint_descriptor inside the struct usb_ep on disable) Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Jiri Slaby <[email protected]>
1 parent 4220f3f commit 19342b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/usb/gadget/f_acm.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,12 @@ static int acm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
430430
if (acm->notify->driver_data) {
431431
VDBG(cdev, "reset acm control interface %d\n", intf);
432432
usb_ep_disable(acm->notify);
433-
} else {
434-
VDBG(cdev, "init acm ctrl interface %d\n", intf);
433+
}
434+
435+
if (!acm->notify->desc)
435436
if (config_ep_by_speed(cdev->gadget, f, acm->notify))
436437
return -EINVAL;
437-
}
438+
438439
usb_ep_enable(acm->notify);
439440
acm->notify->driver_data = acm;
440441

0 commit comments

Comments
 (0)