summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgab-k <[email protected]>2026-03-30 18:51:21 +0200
committergab-k <[email protected]>2026-03-30 18:53:37 +0200
commit6740924c41f1996c92c2459ff4e926d1d6af44ae (patch)
tree26148c278eef069f0485e48c251468266d422c1d
parent1ebd7ebacf98c2160654c2bcb387190b54963a03 (diff)
Revert back to simple edpt_disable()/edpt_activate() inside dcd_edpt_iso_activate(), Clear active EP bit in edpt_disable()
-rw-r--r--src/portable/synopsys/dwc2/dcd_dwc2.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c
index 7a1d7dcf6..4ac3bdcd7 100644
--- a/src/portable/synopsys/dwc2/dcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/dcd_dwc2.c
@@ -345,12 +345,11 @@ static void edpt_disable(uint8_t rhport, uint8_t ep_addr, bool stall) {
dwc2->dctl |= DCTL_CGONAK;
}
}
-}
-// Clear stale active-endpoint state before re-activating ISO OUT with a changed MPS.
-static void edpt_iso_out_reset(uint8_t rhport, uint8_t epnum) {
- dwc2_dep_t* epout = &DWC2_REG(rhport)->epout[epnum];
- epout->doepctl &= ~DOEPCTL_USBAEP;
+ // Clear ActEP
+ if (!stall && epnum != 0) {
+ dep->ctl &= ~EPCTL_USBAEP;
+ }
}
// Since this function returns void, it is not possible to return a boolean success message
@@ -637,20 +636,7 @@ bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet
}
bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc) {
- const uint8_t ep_addr = p_endpoint_desc->bEndpointAddress;
- const uint8_t epnum = tu_edpt_number(ep_addr);
- const uint8_t dir = tu_edpt_dir(ep_addr);
-
- edpt_disable(rhport, ep_addr, false);
-
- if (dir == TUSB_DIR_OUT) {
- const uint16_t new_mps = tu_edpt_packet_size(p_endpoint_desc);
- xfer_ctl_t* xfer = XFER_CTL_BASE(epnum, dir);
- if (xfer->max_size != 0 && xfer->max_size != new_mps) {
- edpt_iso_out_reset(rhport, epnum);
- }
- }
-
+ edpt_disable(rhport, p_endpoint_desc->bEndpointAddress, false);
edpt_activate(rhport, p_endpoint_desc);
return true;
}