-
Notifications
You must be signed in to change notification settings - Fork 2.1k
cdcecm: only activate OUT endpoint after interface selection #12533
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
cdcecm: only activate OUT endpoint after interface selection #12533
Conversation
The OUT endpoint of the cdc ecm data endpoint is only expected to receive data when the alternative interface is activated. Signalling ready in the init function can cause issues as the endpoints are not yet enabled in the low level USB peripheral driver.
Still works on Linux with This is unrelated to this PR, but when using RIOT's USB network interface, my
|
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.
Code makes sense and still works as before.
Thanks for the review! |
Could you please open an issue for this? I've never seen this message and I wonder if it is related to @dylad's issue with the same54-xpro |
Uh never mind - that was actually my USB audio amplifier. |
Contribution description
The OUT endpoint of the cdc ecm data endpoint is only expected to receive data when the alternative interface is activated. Signalling ready in the init function can cause issues as the endpoints are not yet enabled in the low level USB peripheral driver.
The out endpoint ready functions are now only called when either the alternative interface is selected or when netdev signals that the frame is copied by the receive function.
Before this commit the ready function was called on initialization and on reset, in both situations, the endpoint is not yet initialized.
Testing procedure
Verify that
tests/usbus_cdc_ecm
is still functional on any operating system. Testing a single operating system (Linux/MacOS) should be enoughIssues/PRs references
None (so far)