Skip to content

Commit 3150144

Browse files
committed
dwc2/host: immediately retry IN token for bInterval=1
Signed-off-by: Maxime Vincent <[email protected]>
1 parent 865e348 commit 3150144

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/portable/synopsys/dwc2/hcd_dwc2.c

+8
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,14 @@ static void channel_xfer_in_retry(dwc2_regs_t* dwc2, uint8_t ch_id, uint32_t hci
719719
}
720720
}
721721

722+
// immediately retry if bInterval is 1 - otherwise we'd waste a microframe before retrying
723+
if ((hcint & HCINT_HALTED) && (edpt->uframe_interval == 1)) {
724+
edpt->hcchar_bm.odd_frame = 1 - (dwc2->hfnum & 1); // transfer on next frame
725+
channel->hcchar = (edpt->hcchar & ~HCCHAR_CHENA);
726+
channel_send_in_token(dwc2, channel);
727+
return;
728+
}
729+
722730
// for periodic, de-allocate channel, enable SOF set frame counter for later transfer
723731
edpt->next_pid = channel->hctsiz_bm.pid; // save PID
724732
edpt->uframe_countdown = edpt->uframe_interval;

0 commit comments

Comments
 (0)