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

I2C: A couple of fixes around SCL stretching is handled #248

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

Aaron-Hartwig
Copy link
Collaborator

This commit fixes a couple of bugs related to SCL stretching. First off, in the I2CBitController I adjusted how we sample SCL to detect stretching so we're not errantly sampling. Then in the I2CCore I added a mechanism to handle the SCL stretch timeouts when we see them. Before we lacked this and that meant if that was seen, we were wedged. The rest of the changes were to test cases in order to mimic the behavior observed that brought the problems to our attention.

Fixes #246
Fixes #247

@Aaron-Hartwig
Copy link
Collaborator Author

@nathanaelhuffman I actually did not end up faking out the I2CCore per our conversation. In the event a module would get removed while it was being talked to we would detect that as a timeout given the bus voltage will collapse. However now with an actual timeout recovery mechanism in place we can operate as expected when a module comes back since all error/timeout information only pertains to the last transaction.

Copy link
Collaborator

@nathanaelhuffman nathanaelhuffman left a comment

Choose a reason for hiding this comment

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

lgtm

@Aaron-Hartwig Aaron-Hartwig merged commit d4c2c02 into main Dec 9, 2024
8 checks passed
@Aaron-Hartwig Aaron-Hartwig deleted the aaron/qsfp-i2c-scl-fix branch December 9, 2024 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants