aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-11-10 08:56:40 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-14 09:00:11 -0800
commite269a499134d115468db1eb870d053123e1af2e7 (patch)
tree407a476debc2f100172799ea38c48c7553b4bd47
parent55016b9e6084a85d212dfdc17ee708c67c18507d (diff)
downloadlinux-yocto-e269a499134d115468db1eb870d053123e1af2e7.tar.gz
linux-yocto-e269a499134d115468db1eb870d053123e1af2e7.tar.bz2
linux-yocto-e269a499134d115468db1eb870d053123e1af2e7.zip
usb: gadget: function: acm: make f_acm pass USB20CV Chapter9
[ Upstream commit 52ec49a5e56a27c5b6f8217708783eff39f24c16 ] 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 <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/gadget/f_acm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c
index ab1065afbbd0..3384486c2884 100644
--- a/drivers/usb/gadget/f_acm.c
+++ b/drivers/usb/gadget/f_acm.c
@@ -430,11 +430,12 @@ static int acm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
if (acm->notify->driver_data) {
VDBG(cdev, "reset acm control interface %d\n", intf);
usb_ep_disable(acm->notify);
- } else {
- VDBG(cdev, "init acm ctrl interface %d\n", intf);
+ }
+
+ if (!acm->notify->desc)
if (config_ep_by_speed(cdev->gadget, f, acm->notify))
return -EINVAL;
- }
+
usb_ep_enable(acm->notify);
acm->notify->driver_data = acm;