[sonic_xcvr]: Preserve VDM control bits when freezing stats - #759
Closed
mzwang-arista wants to merge 1 commit into
Closed
mzwang-arista wants to merge 1 commit into
mzwang-arista wants to merge 1 commit into
Conversation
Read-modify-write the VDM control register so freeze and unfreeze only modify bit 7, preserving CMIS 5.4 control bits. Return failure when the control register cannot be read. Add coverage for preserved bits, failed reads, and failed writes. Signed-off-by: Michael Wang <mzwang@arista.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Contributor
Author
|
Duplicate #757 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update CMIS VDM freeze and unfreeze operations to use read-modify-write
on the VDM control register. This changes only the freeze control bit
(bit 7), preserving other control bits defined by CMIS 5.4.
Add unit coverage for preserved control bits, EEPROM read failure without
a write, and EEPROM write failure.
Motivation and Context
The existing implementation writes a hardcoded value to the entire VDM
control byte (page 0x2F, byte 144). CMIS 5.4 defines additional control
bits in this byte; overwriting it can unintentionally clear or modify
them, causing VDM data to stop being reported.
How Has This Been Tested?
Ran the focused CMIS unit-test suite using
sonic-py-commonfromSONiC buildimage:
Result:
Also tested on a module where the prior implementation cleared
additional VDM control bits, causing VDM data not to be reported.
With this change, freeze/unfreeze preserves those bits and VDM
reporting continues normally.