@@ -691,8 +691,6 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep,
691691 if (ret < 0 )
692692 return ret ;
693693
694- dep -> flags |= DWC3_EP_BUSY ;
695-
696694 dep -> resource_index = dwc3_gadget_ep_get_transfer_index (dep );
697695 WARN_ON_ONCE (!dep -> resource_index );
698696 }
@@ -1257,8 +1255,6 @@ static int __dwc3_gadget_kick_transfer(struct dwc3_ep *dep)
12571255 return ret ;
12581256 }
12591257
1260- dep -> flags |= DWC3_EP_BUSY ;
1261-
12621258 if (starting ) {
12631259 dep -> resource_index = dwc3_gadget_ep_get_transfer_index (dep );
12641260 WARN_ON_ONCE (!dep -> resource_index );
@@ -2389,7 +2385,7 @@ static int dwc3_gadget_ep_cleanup_completed_requests(struct dwc3_ep *dep,
23892385 /*
23902386 * Our endpoint might get disabled by another thread during
23912387 * dwc3_gadget_giveback(). If that happens, we're just gonna return 1
2392- * early on so DWC3_EP_BUSY flag gets cleared
2388+ * early.
23932389 */
23942390 if (!dep -> endpoint .desc )
23952391 return 1 ;
@@ -2432,18 +2428,13 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
24322428{
24332429 struct dwc3 * dwc = dep -> dwc ;
24342430 unsigned status = 0 ;
2435- int clean_busy ;
24362431
24372432 dwc3_gadget_endpoint_frame_from_event (dep , event );
24382433
24392434 if (event -> status & DEPEVT_STATUS_BUSERR )
24402435 status = - ECONNRESET ;
24412436
2442- clean_busy = dwc3_gadget_ep_cleanup_completed_requests (dep , event ,
2443- status );
2444- if (clean_busy && (!dep -> endpoint .desc ||
2445- usb_endpoint_xfer_isoc (dep -> endpoint .desc )))
2446- dep -> flags &= ~DWC3_EP_BUSY ;
2437+ dwc3_gadget_ep_cleanup_completed_requests (dep , event , status );
24472438
24482439 /*
24492440 * WORKAROUND: This is the 2nd half of U1/U2 -> U0 workaround.
@@ -2612,7 +2603,6 @@ static void dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force)
26122603 ret = dwc3_send_gadget_ep_cmd (dep , cmd , & params );
26132604 WARN_ON_ONCE (ret );
26142605 dep -> resource_index = 0 ;
2615- dep -> flags &= ~DWC3_EP_BUSY ;
26162606
26172607 if (dwc3_is_usb31 (dwc ) || dwc -> revision < DWC3_REVISION_310A ) {
26182608 dep -> flags |= DWC3_EP_END_TRANSFER_PENDING ;
0 commit comments