]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
gadget: f_thor: properly enable 3rd endpoint defined by the protocol
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 2 Oct 2019 10:27:18 +0000 (12:27 +0200)
committerMarek Vasut <marek.vasut+renesas@gmail.com>
Thu, 31 Oct 2019 11:12:31 +0000 (12:12 +0100)
This is needed to make Windows THOR flash tool happy, because it
starts sending data only when interrupt packet is received on the 3rd
endpoint.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Lukasz Majewski <lukma@denx.de>
drivers/usb/gadget/f_thor.c

index 8b3b19feaf3d45dc074125ed1786a0f6a6a31051..920fa5279cd240d6e8b30c45cdd9786936da5a66 100644 (file)
@@ -941,6 +941,13 @@ static int thor_eps_setup(struct usb_function *f)
        dev->out_req = req;
        /* ACM control EP */
        ep = dev->int_ep;
+       d = ep_desc(gadget, &hs_int_desc, &fs_int_desc);
+       debug("(d)bEndpointAddress: 0x%x\n", d->bEndpointAddress);
+
+       result = usb_ep_enable(ep, d);
+       if (result)
+               goto err;
+
        ep->driver_data = cdev; /* claim */
 
        return 0;