Skip to content
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

!fix usbd stop ep - after reset there was leaved enabled ep with broken transfers #64

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

alexrayne
Copy link

here patch ensures disabling endpoints when disble or endpoint stop requested.
enabled endpoints for hunged transfers was leaved enabled after reset, or urb cancel. therefore this enpoints fails to start new request validly.

@@ -173,11 +173,11 @@ static void disable_all_non_ep0(usbd_device *dev)

REBASE(DWC_OTG_DOEPxINT, i) = 0xFFFF;
REBASE(DWC_OTG_DOEPxTSIZ, i) = 0;
REBASE(DWC_OTG_DOEPxCTL, i) = DWC_OTG_DOEPCTL_SNAK;
REBASE(DWC_OTG_DOEPxCTL, i) = DWC_OTG_DOEPCTL_SNAK | DWC_OTG_DOEPCTL_EPDIS;
Copy link
Contributor

Choose a reason for hiding this comment

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

That is why a NAK has been placed on the endpoint (to mark as not an active endpoint).
host is not expected to IO from the endpoint.
Also, who is handling the endpoint disable interrupt callback?

alexrayne added 2 commits May 25, 2017 00:47
… set! also

        better to avoid EPDIS interrupt for normaly completed and disabled endpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants