Skip to content

USB: Device: Fix IN and OUT callbacks #6884

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

Conversation

fkjagodzinski
Copy link
Member

Do not fail the assertion if no endpoints are pending when IN or OUT
transmission takes place.

The condition info->pending >= 1 may be false if endpoint_abort() is
called after the read_start() or write_start() and before the
out() or in() callback.

Description

Pull request type

[ ] Fix
[x] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

CC @c1728p9 @maciejbocianski @jamesbeyond

Do not fail the assertion if no endpoints are pending when IN or OUT
transmission takes place.

The condition `info->pending >= 1` may be false if `endpoint_abort()` is
called after the `read_start()` or `write_start()` and before the
`out()` or `in()` callback.
@maciejbocianski
Copy link
Contributor

If the endpoint was already aborted, whether endpoint callbacks in/out should't be blocked in USBPhyHw::process(void) for that endpoint?
BTW function USBPhyHw::endpoint_abort is not implemented for target NXP

Copy link
Contributor

@c1728p9 c1728p9 left a comment

Choose a reason for hiding this comment

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

I'll try to fix this for the existing targets. Feel free to close this PR.

@0xc0170
Copy link
Contributor

0xc0170 commented May 15, 2018

@fkjagodzinski shall we keep this opened until new PR is up?

@fkjagodzinski
Copy link
Member Author

@fkjagodzinski shall we keep this opened until new PR is up?

@0xc0170, I don't think so. I've already talked about this with @c1728p9. This approach is not correct, the assert should stay and rather the abort function should be updated.

@cmonr cmonr removed the needs: work label May 15, 2018
@fkjagodzinski fkjagodzinski deleted the fix-feature-hal-spec-usb-device branch May 25, 2018 10:02
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.

5 participants