Skip to content

[sonic_thermal]Add abstract class for thermal plugin#75

Merged
jleveque merged 2 commits intosonic-net:masterfrom
stephenxs:plugin_thermal
Jan 21, 2020
Merged

[sonic_thermal]Add abstract class for thermal plugin#75
jleveque merged 2 commits intosonic-net:masterfrom
stephenxs:plugin_thermal

Conversation

@stephenxs
Copy link
Collaborator

What I did
Add an abstract class for thermal plugin
How I did it
Add the following interfaces for thermal plugin

  • get_num_thermals
  • get_name
  • get_temperature
  • get_low_threshold
  • get_low_critical_threshold
  • get_high_threshold
  • get_high_critical_threshold

@jleveque jleveque merged commit 8678383 into sonic-net:master 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants