[sonic_thermal]Add abstract class for thermal plugin#75
Merged
jleveque merged 2 commits intosonic-net:masterfrom Jan 21, 2020
Merged
[sonic_thermal]Add abstract class for thermal plugin#75jleveque merged 2 commits intosonic-net:masterfrom
jleveque merged 2 commits intosonic-net:masterfrom
Conversation
This was referenced Jan 18, 2020
keboliu
approved these changes
Jan 19, 2020
jleveque
approved these changes
Jan 21, 2020
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-platform-common
that referenced
this pull request
Oct 25, 2024
Fixes the following bug reproduced on SONiC.HEAD.729-dirty-20200727.195955:
```
WARNING pmon#psud: Failed to get led status for psu 1
INFO pmon#supervisord: psud Traceback (most recent call last):
INFO pmon#supervisord: psud File "/usr/bin/psud", line 373, in <module>
INFO pmon#supervisord: psud main()
INFO pmon#supervisord: psud File "/usr/bin/psud", line 370, in main
INFO pmon#supervisord: psud psud.run()
INFO pmon#supervisord: psud File "/usr/bin/psud", line 255, in run
pmon#supervisord: psud self._update_led_color(psu_tbl)
pmon#supervisord: psud File "/usr/bin/psud", line 361, in _update_led_color
pmon#supervisord: psud ('led_status', NOT_AVAILABLE)
pmon#supervisord: psud NameError: global name 'NOT_AVAILABLE' is not defined
```
Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
Junchao-Mellanox
pushed a commit
to Junchao-Mellanox/sonic-platform-common
that referenced
this pull request
May 7, 2025
…sting TX disable channel implementation (sonic-net#75) <!-- Provide a general summary of your changes in the Title above --> #### Description <!-- Describe your changes in detail --> Refactored the `rx_disable_channel` method to use a bitmask-based approach instead of handling individual `RegBitField` entries. This change ensures that multiple channels can be updated in a single operation rather than writing to individual fields separately. #### Motivation and Context <!-- Why is this change required? What problem does it solve? If this pull request closes/resolves an open Issue, make sure you include the text "fixes #xxxx", "closes #xxxx" or "resolves #xxxx" here --> The previous implementation used per-channel field writes, which were inefficient and inconsistent with the `tx_disable_channel` implementation. The new approach improves performance and maintains uniform handling of RX and TX disable states. #### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> - Verified correct bitmask application by testing with various `channel` values. - Confirmed EEPROM write operations correctly update the `RX_DISABLE_FIELD`. #### Additional Information (Optional) This update aligns the RX disable logic with the existing TX disable implementation for better maintainability and consistency.
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.
What I did
Add an abstract class for thermal plugin
How I did it
Add the following interfaces for thermal plugin