This makes DWC3_EP_WEDGE do the right thing (I think) Signed-off-by: Paul Zimmerman <paulz@xxxxxxxxxxxx> --- drivers/usb/dwc3/gadget.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 29d9e4a..5283956 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -873,6 +873,9 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value) struct dwc3 *dwc = dep->dwc; int number, ret; + if (!value && (dep->flags & DWC3_EP_WEDGE)) + return 0; + memset(¶ms, 0x00, sizeof(params)); if (dep->number == 1) @@ -928,6 +931,9 @@ static int dwc3_gadget_ep_set_halt(struct usb_ep *ep, int value) goto out; } + if (!value && (dep->flags & DWC3_EP_WEDGE)) + dep->flags &= ~DWC3_EP_WEDGE; + ret = __dwc3_gadget_ep_set_halt(dep, value); out: spin_unlock_irqrestore(&dwc->lock, flags); -- 1.7.6.233.gd79bc -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html