summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-04-11 17:02:42 +0200
committerHiFiPhile <[email protected]>2025-04-11 17:18:36 +0200
commit925010fd841c5442579c503a3b1aa211cc25e8b2 (patch)
tree2c42bb37875351e0b2862cb641ff74d9225dec2a /src
parent42213eff2b4f6583773caac8a4d7c450be31f30a (diff)
host/dwc2: resume OUT transfer when PING ACKed
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/portable/synopsys/dwc2/hcd_dwc2.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/portable/synopsys/dwc2/hcd_dwc2.c b/src/portable/synopsys/dwc2/hcd_dwc2.c
index 7cbef05b7..22f3bc70a 100644
--- a/src/portable/synopsys/dwc2/hcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/hcd_dwc2.c
@@ -590,7 +590,7 @@ static bool channel_xfer_start(dwc2_regs_t* dwc2, uint8_t ch_id) {
hcintmsk |= HCINT_BABBLE_ERR | HCINT_DATATOGGLE_ERR | HCINT_ACK;
} else {
hcintmsk |= HCINT_NYET;
- if (edpt->hcsplt_bm.split_en) {
+ if (edpt->hcsplt_bm.split_en || hctsiz & HCTSIZ_DOPING) {
hcintmsk |= HCINT_ACK;
}
}
@@ -973,10 +973,17 @@ static bool handle_channel_out_slave(dwc2_regs_t* dwc2, uint8_t ch_id, uint32_t
} else if (hcint & HCINT_ACK) {
xfer->err_count = 0;
channel->hcintmsk &= ~HCINT_ACK;
- if (channel->hcsplt_bm.split_en && !channel->hcsplt_bm.split_compl) {
- // start split is ACK --> do complete split
- channel->hcsplt_bm.split_compl = 1;
- channel->hcchar |= HCCHAR_CHENA;
+ if (channel->hcsplt_bm.split_en) {
+ if(!channel->hcsplt_bm.split_compl) {
+ // start split is ACK --> do complete split
+ channel->hcsplt_bm.split_compl = 1;
+ channel->hcchar |= HCCHAR_CHENA;
+ }
+ } else {
+ // Device is ready, resume transfer
+ edpt->do_ping = 0;
+ xfer->err_count = 0;
+ TU_ASSERT(channel_xfer_start(dwc2, ch_id));
}
}