Skip to content

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