Skip to content

Commit

Permalink
Fix QSFP-DD power class mask (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
snider-nokia committed Oct 6, 2021
1 parent 4598d40 commit 221fb8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sonic_platform_base/sonic_sfp/qsfp_dd.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def decode_connector(self, eeprom_data, offset, size):
def decode_ext_id(self, eeprom_data, offset, size):
# bits 5-7 represent Module Card Power Class
ext_id_power_class_byte = eeprom_data[offset]
ext_id_power_class_code = (int(ext_id_power_class_byte, 16) >> 5) & 3
ext_id_power_class_code = (int(ext_id_power_class_byte, 16) >> 5) & 7
# Max power is in multiply of 0.25W
ext_id_max_power_byte = eeprom_data[offset + 1]
ext_id_max_power_value = int(ext_id_max_power_byte, 16)
Expand Down

0 comments on commit 221fb8a

Please sign in to comment.