-
Notifications
You must be signed in to change notification settings - Fork 1.2k
dwc2/host: immediately retry IN token for bInterval=1 #3072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dwc2/host: immediately retry IN token for bInterval=1 #3072
Conversation
Just did some tests and confirmed my guess, all intervals are polled one frame longer. |
1b37f2e
to
46ec89e
Compare
@HiFiPhile thanks, that makes sense! However, if I try your branch, I get a data toggle error. (Cannot just issue a However, I have integrated your idea into this PR and update it. Can you check? |
I didn't met it in my side, what's the error message ? |
I get a |
Signed-off-by: Maxime Vincent <[email protected]>
Signed-off-by: Maxime Vincent <[email protected]>
46ec89e
to
62d06e7
Compare
I have also rebased on master, and should have properly merged the bitfields change. |
Ah that's make sense |
…y() is only called when channel is halted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for your PR. I also clean up and remove the halted_sof_schedule flags (obsolete code). since channel_xfer_in_retry() is only called when halted. Please check if the changes make sense to you
A small fix added in #3088 |
Describe the PR
When connecting a HS device with an interrupt endpoint with bInterval = 1 (1 microframe, 125us), it was being polled only at 2 microframe interval (250us), in case of a NAK. This is because the retry was deferred to the next SOF, basically wasting a full microframe.
The fix is to re-send the IN token as soon as we get the NAK, in base bInterval = 1. In other cases, we still rely on the existing polling interval calculations in the SOF IRQ handler.
Additional context
Pre-fix situation:

Post-fix situation:

(the SOF IRQ is fired, but is not used to schedule the retry, hence no xfer_kickoff from there)
@HiFiPhile @roma-jam