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

ksz9477: MMD indirect access check fix #287

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Conversation

jnippula
Copy link

@jnippula jnippula commented Sep 20, 2024

Instead of verifying MMD indirect access by checking EEE ADVERTISEMENT register has value 0x6 (which may be changed), the verification is done by write and check LED MODE register.
1. Backup current LED_MODE register value
2. Write value Single-LED mode (0x10) to LED_MODE
3. Read LED_MODE register and verify it returns value 0x10
4. Write original (backup) value to LED_MODE

@jnippula jnippula force-pushed the ksz9477-mmd-check-fix branch 2 times, most recently from f2f99bb to 7b20aa2 Compare September 20, 2024 11:52
Instead of verifying MMD indirect access by checking
EEE ADVERTISEMENT register has value 0x6 (which may be changed),
the verification is done by write and check LED MODE register.
1. Backup current LED_MODE register value
2. Write value Single-LED mode (0x10) to LED_MODE
3. Read LED_MODE register and verify it returns value 0x10
4. Write original (backup) value to LED_MODE
@jnippula
Copy link
Author

Modified code a bit to first read and backup the original value, just in case it is set somewhere else.

@jnippula jnippula merged commit ff930ea into master Sep 23, 2024
11 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.

2 participants