Skip to content

host/dwc2: resume OUT transfer when PING ACKed #3077

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

Merged
merged 4 commits into from
Apr 18, 2025

Conversation

HiFiPhile
Copy link
Collaborator

Describe the PR
Seems the resume is missing.

Before:
usbpv_oSz11aDXqL

After:
usbpv_vEXFvCaiRW

hathach added 2 commits April 18, 2025 17:59
# Conflicts:
#	src/portable/synopsys/dwc2/hcd_dwc2.c
channel->hcchar |= HCCHAR_CHENA;
}
} else {
// Device is ready, resume transfer
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to use channel_xfer_start() since all meta data is setup, also it will toggle PID (causing data toggle error). Just enabled channel with channel->hcchar |= HCCHAR_CHENA; is good enough.

…byte command

- correctly carry out OUT transfer when PING is ack
Copy link
Owner

@hathach hathach left a 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. PING is indeed missing, I have

  • rename to next_do_ping for clearer meaning
  • I found that in case of transfer complete with NYET, we didn't do ping e.g msc out 31 bytes command
  • simply use channel->hcchar |= HCCHAR_CHENA; to continue transfer with existing meta data. Note channel.hctsiz.do_ping is cleared by host controller when interrupt trigger (in my testing with stm32f769), but we clear it anyway since dwc2 has too many variants :)

@HiFiPhile please re-test if this work for you. I tested without hub

@HiFiPhile
Copy link
Collaborator Author

Thank you, I think it's good on h7rs.

@hathach hathach merged commit 5572168 into hathach:master Apr 18, 2025
108 checks passed
@HiFiPhile HiFiPhile deleted the ping_out branch April 22, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants