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 of723fd5668fwhich fixed the same issue but for the chipidea controller. Fixes:27c9141b11("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>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user