Skip to content
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

Mass storage assert fixes #219

Merged
merged 2 commits into from
Jan 9, 2017
Merged

Conversation

c1728p9
Copy link
Contributor

@c1728p9 c1728p9 commented Jan 9, 2017

Correct asserts that were triggering incorrectly.

In USBD_MSC_MemoryWrite if Offset and BulkLen are both 0 then then
there is an integer underflow and an assert is falsely triggered. This
patch corrects that logic so the assert is is only triggered if there
would have been a buffer overflow.

Prior to this patch this assert would occur during a write if the media
state changes to not ready after the CBW has been read but before
any data has been transferred.
Assert that bulk out is halted when handling an unexpected out packet
when waiting to send the CSW. If this endpoint is halted then the
packet is leftover from the previous transaction.
@c1728p9
Copy link
Contributor Author

c1728p9 commented Jan 9, 2017

@mbed-bot: TEST

Copy link
Contributor

@sg- sg- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@c1728p9 c1728p9 merged commit 7e984f8 into ARMmbed:master Jan 9, 2017
@c1728p9 c1728p9 deleted the mass_storage_assert_fixes branch January 9, 2017 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants