[platform_manager][weutil][darwin48v] Add an eeprom offset for i2cDeviceConfigs, use it to fix darwin48v eeprom issues#625
Open
dzarista wants to merge 1 commit intofacebook:mainfrom
Open
Conversation
e3129f5 to
7e2ab26
Compare
|
@RomanChoporov-Meta has imported this pull request. If you are a Meta employee, you can view this in D93255306. |
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.
Summary
Currently, i2cDeviceConfigs do not have an option to pass in an eeprom offset, unlike idpromConfigs.
This is an issue on platforms such as darwin48v which have an i2cDeviceConfig eeprom that has a specific offset where the Meta format is stored.
To solve this, I've added an optional i32 eepromOffset variable to the i2cDeviceConfig. During platform exploration for i2cDeviceConfigs, this offset will be checked if it exists and the appropriate FbossEepromInterface object will be created. I've also modified the weutil ConfigUtils to check for this offset.
In ConfigValidator, I've added a check for i2cDeviceConfigs that requires isEeprom to be true if an eeprom offset is defiend.
Additionally, I've removed the fanspinner symlink generation from platform manager for darwin(48v) as it does not have a valid Meta eeprom.
Test Plan
On darwin(48v) -
platform_manager initializes and does not display errors related to the chassis eeprom or fanspinner eeprom.
weutil_hw_test passes.