diff options
author | Gary Bisson <gary.bisson@boundarydevices.com> | 2022-01-06 18:02:08 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-08 19:16:03 +0300 |
commit | 8f758683a8077a13571f6ad57ccb4d7fe9e7b184 (patch) | |
tree | 1d194d76de571e114fa4863911e8916e8ad070d4 | |
parent | 7ad0cee75477507f3406a6b50637555d4fe3751a (diff) | |
download | u-boot-8f758683a8077a13571f6ad57ccb4d7fe9e7b184.tar.xz |
usb: gadget: dwc2_udc_otg: set ep's desc during enable/disable
Fastboot support has been broken on platforms using dwc2 controller
since the gadget gets its max packet size from it.
This patch is the equivalent of 723fd5668ff which fixed the same issue
but for the chipidea controller.
Fixes: 27c9141b111 ("usb: gadget: fastboot: use correct max packet size")
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
-rw-r--r-- | drivers/usb/gadget/dwc2_udc_otg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c index 2f31814442..fb10884755 100644 --- a/drivers/usb/gadget/dwc2_udc_otg.c +++ b/drivers/usb/gadget/dwc2_udc_otg.c @@ -655,6 +655,7 @@ static int dwc2_ep_enable(struct usb_ep *_ep, return -ESHUTDOWN; } + _ep->desc = desc; ep->stopped = 0; ep->desc = desc; ep->pio_irqs = 0; @@ -695,6 +696,7 @@ static int dwc2_ep_disable(struct usb_ep *_ep) /* Nuke all pending requests */ nuke(ep, -ESHUTDOWN); + _ep->desc = NULL; ep->desc = 0; ep->stopped = 1; |