-
Notifications
You must be signed in to change notification settings - Fork 734
Mass Storage and DWC2 cherry-picks #3548
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
Closed
Closed
Conversation
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
When endpoint enqueue fails the device has no reliable means of recovery other than a reset. Implement 6.6.2 Internal Device Error handling on failed enqueue. Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no> (cherry picked from commit 78291d4)
Double buffering make it possible to significantly increase the transfer rates by avoiding idle states. With two SCSI buffers, one buffer can be used by disk subsystem while the other is being used by UDC (ideally with DMA). Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no> (cherry picked from commit 1243aba)
MSC BOT can work with just one buffer because buffer to receive CBW is never queued at the same time as CSW. SCSI buffer needs to be multiple of bulk endpoint wMaxPacketSize and therefore is suitable for handling both CBW and CSW. Take advantage of this to reduce memory usage. Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no> (cherry picked from commit 7e11bc5)
Multiple submitted requests are getting merged to single cancelled net_buf on endpoint dequeue. While MSC class was correctly decrementing the usage counters, it was not freeing SCSI buffer pointed to by frags. Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no> (cherry picked from commit 152844a)
…hange Perform cache operations in thread context when the buffer ownership changes between USB stack and UDC driver. This offers clearly measurable throughput increase on Mass Storage when double buffering is enabled. When endpoint operations are not double buffered the difference is negligible. The positive side effect is reducing number of operations performed in interrupt context. Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no> (cherry picked from commit 614dd57)
…bus reset DWC2 core automatically clears USBActEP (for all endpoints other than endpoint 0) on bus reset. While core is deactivating the endpoint, it does not disarm it. On bus reset USB stack first calls ep_disable API and then ep_dequeue. This was leading to endpoint is not active warning followed by endpoint disable timeout. Disable timeout was effectively caused by waiting for EPDisbld interrupt on endpoint with disabled interrupts. Solve the issue by unconditionally disarming endpoint in ep_disable API handler. Remove the false warning because USBActEP cannot really be used for sanity checking as it is not only the driver that clears it. Upstream PR #: 99958 Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
NordicBuilder
added a commit
to NordicBuilder/sdk-nrf
that referenced
this pull request
Nov 27, 2025
Automatically created by action-manifest-pr GH action from PR: nrfconnect/sdk-zephyr#3548 Signed-off-by: Nordic Builder <pylon@nordicsemi.no>
carlescufi
approved these changes
Nov 27, 2025
jfischer-no
approved these changes
Nov 27, 2025
Merged
Contributor
|
Integrated in #3553 |
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.
No description provided.