drivers: usb: udc: common: log requested endpoint configuration#106167
Merged
nashif merged 1 commit intozephyrproject-rtos:mainfrom Apr 15, 2026
Merged
Conversation
In `ep_check_config()`, capabilities of the endpoint provided by the driver are logged, but not the requested endpoint configuration. As a result, when the function fails, it is not possible to determine why using only logs. Add logging of the requested configuration in addition to the driver caps to allow easily determining the cause of the failure (when logging is on). Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
|
Contributor
Author
|
I think this is acceptable under rc1 merge criteria (not a new feature) so tagging as milestone |
josuah
approved these changes
Mar 24, 2026
tmon-nordic
approved these changes
Mar 26, 2026
jfischer-no
approved these changes
Mar 26, 2026
Contributor
"only bug-fix, documentation and stabilization patches may be merged to the main branch." IMO, additional logging at the debug level does not seems to be one of them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



In
ep_check_config(), capabilities of the endpoint provided by the driver are logged, but not the requested endpoint configuration. As a result, when the function fails, it is not possible to determine why using only logs.Add logging of the requested configuration in addition to the driver caps to allow easily determining the cause of the failure (when logging is on).
This is something I had to manually patch in several time when debugging USB issues so I think it's a good addition, especially since it has no additional cost when logging is not enabled (or under
LOG_LEVEL_DBG).It can also be very useful in situations such as #105151 where a specific configuration is required for certain use cases, but the driver has no chance to emit a vendor-specific warning since the stack preemptively fails
udc_ep_enable().