Conversation
|
ST Internal Reference: 42c389938372c714c09687402fda1ed4 |
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.
Description
Fixes #6.
_ux_hcd_stm32_periodic_schedule()marksux_stm32_ed_dataasUX_HCD_STM32_ED_STATUS_ALIGNED_BUFFER_PENDING_FREEwhenever the pointer is non-NULL.
For periodic transfers,
ux_stm32_ed_datamay point directly toux_transfer_request_data_pointer, which is the original reusabletransfer buffer and must not be treated as an HCD-owned aligned buffer.
This change sets
PENDING_FREEonly whenux_stm32_ed_datadiffersfrom the original transfer request data pointer.
Test
Tested with:
Before the change, repeated HUB Interrupt IN transactions caused the
reusable transfer buffer to be freed and eventually resulted in
UX_MEMORY_CORRUPTED.After the change, the reusable HUB interrupt buffer remains valid and
the downstream MSC device operates normally.