fix low polarity wrong value for hw_reset deassert and seek(0) before reading sysfs #10
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.
Why I did it
fix low polarity wrong value for hw_reset deassert as part of power_on_module state function
fix power_good sysfs that returns empty string upon cable plug out
Work item tracking
How I did it
send 1 to hw_reset sysfs instead of existing 0 value sent to deassert hw_reset after power_on when needed
move seek(0) of sysfs fd before reading the sysfs fd
How to verify it
run the code in manual test of plugged out cable when the switch it booted.
then plug in the cable after module detection is done and dynamic detection takes place listening to sysfs changes via poller
for optic CMIS cable CMIS it will not be powered on thus will go into power_on_module function with the above change here.
at the end of module detection for this new cable inserted, EEPROM should be available for reading (currently with 0 sent to hw_reset EEPROM is not available at the end)
make sure power_good sysfs is not empty anymore upon cable plug out - it should have value of 0 when the cable is out
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)