Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52ec49a5 authored by Felipe Balbi's avatar Felipe Balbi
Browse files

usb: gadget: function: acm: make f_acm pass USB20CV Chapter9



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: f9c56cdd (usb: gadget: Clear usb_endpoint_descriptor
	inside the struct usb_ep on disable)
Cc: <stable@vger.kernel.org> # v3.4+
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent e975be28
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -433,12 +433,12 @@ static int acm_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
			dev_vdbg(&cdev->gadget->dev,
			dev_vdbg(&cdev->gadget->dev,
				 "reset acm control interface %d\n", intf);
				 "reset acm control interface %d\n", intf);
			usb_ep_disable(acm->notify);
			usb_ep_disable(acm->notify);
		} else {
		}
			dev_vdbg(&cdev->gadget->dev,

				 "init acm ctrl interface %d\n", intf);
		if (!acm->notify->desc)
			if (config_ep_by_speed(cdev->gadget, f, acm->notify))
			if (config_ep_by_speed(cdev->gadget, f, acm->notify))
				return -EINVAL;
				return -EINVAL;
		}

		usb_ep_enable(acm->notify);
		usb_ep_enable(acm->notify);
		acm->notify->driver_data = acm;
		acm->notify->driver_data = acm;