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_hub: split powered state and request to prevent glitches #21

Merged
merged 1 commit into from Jun 8, 2023

Conversation

hnez
Copy link
Member

@hnez hnez commented May 16, 2023

The power state of the USB Hub ports may be changed by the tacd or by some other program, e.g. uhubctl.
We do not (yet) have an interface to be notified of changes to the port, so we use periodic polling instead.

Up until now we've just accepted that a topic.set() triggered by the periodic polling triggers a write to the port with the state it just read.
This does however result in glitches when a new value is set e.g. via the API while the polling task is reading the current state, resulting in the state being reset to the previous state.

This issue is triggered by the scripts used to stress the TAC during an EMI test.

Related Pull Requests

@hnez hnez force-pushed the usb-hub-state branch 2 times, most recently from 9b2d6f1 to ac22b50 Compare May 30, 2023 06:01
Previously a change request could come in while the polling task was reading
the status resulting in the state switching back and forth.

Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
@hnez hnez merged commit f621974 into linux-automation:main Jun 8, 2023
10 checks passed
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