cdcecm: only activate OUT endpoint after interface selection#12533
cdcecm: only activate OUT endpoint after interface selection#12533bergzand merged 1 commit intoRIOT-OS:masterfrom
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 |
benpicco
left a comment
There was a problem hiding this comment.
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_ecmis still functional on any operating system. Testing a single operating system (Linux/MacOS) should be enoughIssues/PRs references
None (so far)