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

USB: SET_ADDRESS logic error #30972

Closed
LuoZhongYao opened this issue Dec 23, 2020 · 1 comment
Closed

USB: SET_ADDRESS logic error #30972

LuoZhongYao opened this issue Dec 23, 2020 · 1 comment
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Wont Fix Not going to fix or implement

Comments

@LuoZhongYao
Copy link
Contributor

Describe the bug
When enumerating USB, when HOST sends a SET_ADDRESS command to zephyr, zephyr first calls usb_dc_set_address, and then responds via usb_dc_write, and this response uses a new device address, causing enumeration to fail, because HOST is still waiting for a response at address 0.

Expected behavior
After zephyr receives the SET_ADDRESS command, it should answer first, and then call usb_dc_set_address

Impact
usb enumeration failed

Environment (please complete the following information):

@LuoZhongYao LuoZhongYao added the bug The issue is a bug, or the PR is fixing a bug label Dec 23, 2020
@jfischer-no
Copy link
Collaborator

When enumerating USB, when HOST sends a SET_ADDRESS command to zephyr, zephyr first calls usb_dc_set_address, and then responds via usb_dc_write, and this response uses a new device address, causing enumeration to fail, because HOST is still waiting for a response at address 0.

It is up to the driver to handle this situation correctly. This is due to historical reasons and it does not work differently with some drivers. For the current implementation of the stack this will not change.

@jfischer-no jfischer-no added area: USB Universal Serial Bus priority: low Low impact/importance bug Wont Fix Not going to fix or implement labels Dec 23, 2020
@nashif nashif closed this as completed Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug priority: low Low impact/importance bug Wont Fix Not going to fix or implement
Projects
None yet
Development

No branches or pull requests

3 participants