|
|
@@ -623,7 +623,6 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, unsigned int action)
|
|
|
|
|
|
dep->type = usb_endpoint_type(desc);
|
|
|
dep->flags |= DWC3_EP_ENABLED;
|
|
|
- dep->flags &= ~DWC3_EP_END_TRANSFER_PENDING;
|
|
|
|
|
|
reg = dwc3_readl(dwc->regs, DWC3_DALEPENA);
|
|
|
reg |= DWC3_DALEPENA_EP(dep->number);
|
|
|
@@ -729,7 +728,7 @@ static int __dwc3_gadget_ep_disable(struct dwc3_ep *dep)
|
|
|
|
|
|
dep->stream_capable = false;
|
|
|
dep->type = 0;
|
|
|
- dep->flags &= DWC3_EP_END_TRANSFER_PENDING;
|
|
|
+ dep->flags = 0;
|
|
|
|
|
|
/* Clear out the ep descriptors for non-ep0 */
|
|
|
if (dep->number > 1) {
|
|
|
@@ -2383,7 +2382,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
|
|
|
dep = dwc->eps[epnum];
|
|
|
|
|
|
if (!(dep->flags & DWC3_EP_ENABLED)) {
|
|
|
- if (!(dep->flags & DWC3_EP_END_TRANSFER_PENDING))
|
|
|
+ if (!(dep->flags & DWC3_EP_TRANSFER_STARTED))
|
|
|
return;
|
|
|
|
|
|
/* Handle only EPCMDCMPLT when EP disabled */
|
|
|
@@ -2407,8 +2406,7 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
|
|
|
cmd = DEPEVT_PARAMETER_CMD(event->parameters);
|
|
|
|
|
|
if (cmd == DWC3_DEPCMD_ENDTRANSFER) {
|
|
|
- dep->flags &= ~(DWC3_EP_END_TRANSFER_PENDING |
|
|
|
- DWC3_EP_TRANSFER_STARTED);
|
|
|
+ dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
|
|
|
dwc3_gadget_ep_cleanup_cancelled_requests(dep);
|
|
|
}
|
|
|
break;
|
|
|
@@ -2465,8 +2463,7 @@ static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force)
|
|
|
u32 cmd;
|
|
|
int ret;
|
|
|
|
|
|
- if ((dep->flags & DWC3_EP_END_TRANSFER_PENDING)
|
|
|
- || !(dep->flags & DWC3_EP_TRANSFER_STARTED))
|
|
|
+ if (!(dep->flags & DWC3_EP_TRANSFER_STARTED))
|
|
|
return;
|
|
|
|
|
|
/*
|
|
|
@@ -2509,10 +2506,8 @@ static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force)
|
|
|
WARN_ON_ONCE(ret);
|
|
|
dep->resource_index = 0;
|
|
|
|
|
|
- if (dwc3_is_usb31(dwc) || dwc->revision < DWC3_REVISION_310A) {
|
|
|
- dep->flags |= DWC3_EP_END_TRANSFER_PENDING;
|
|
|
+ if (dwc3_is_usb31(dwc) || dwc->revision < DWC3_REVISION_310A)
|
|
|
udelay(100);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
static void dwc3_clear_stall_all_ep(struct dwc3 *dwc)
|