summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorLi Jun <jun.li@nxp.com>2021-01-25 21:44:00 +0800
committerMarek Vasut <marex@denx.de>2021-01-31 14:08:56 +0100
commit723fd5668ff2c8dd19e808778b5670d0fa6bdc4b (patch)
tree7d0c857dd08e713645737fe3127ca9050d7240e0 /drivers/usb
parent27c9141b1114fd5721437abbb1c694e45e765f19 (diff)
downloadu-boot-723fd5668ff2c8dd19e808778b5670d0fa6bdc4b.tar.gz
u-boot-723fd5668ff2c8dd19e808778b5670d0fa6bdc4b.tar.bz2
u-boot-723fd5668ff2c8dd19e808778b5670d0fa6bdc4b.zip
usb: gaget: ci: set ep's desc when enable ep
As we need standard usb_ep's desc, so set it when enable ep. Reviewed-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Li Jun <jun.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/ci_udc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
index b64e4bb605..226a9e6d67 100644
--- a/drivers/usb/gadget/ci_udc.c
+++ b/drivers/usb/gadget/ci_udc.c
@@ -336,6 +336,7 @@ static int ci_ep_enable(struct usb_ep *ep,
num = desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
in = (desc->bEndpointAddress & USB_DIR_IN) != 0;
ci_ep->desc = desc;
+ ep->desc = desc;
if (num) {
int max = get_unaligned_le16(&desc->wMaxPacketSize);
@@ -358,6 +359,7 @@ static int ci_ep_disable(struct usb_ep *ep)
struct ci_ep *ci_ep = container_of(ep, struct ci_ep, ep);
ci_ep->desc = NULL;
+ ep->desc = NULL;
return 0;
}