host/dwc2: resume OUT transfer when PING ACKed

Signed-off-by: HiFiPhile <admin@hifiphile.com>
This commit is contained in:
HiFiPhile
2025-04-11 17:02:42 +02:00
parent 42213eff2b
commit 925010fd84

View File

@@ -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));
}
}