From 221fb8aa60e8d98da30bcf731ad1acf630b12112 Mon Sep 17 00:00:00 2001 From: snider-nokia <76123698+snider-nokia@users.noreply.github.com> Date: Wed, 6 Oct 2021 01:41:18 -0400 Subject: [PATCH] Fix QSFP-DD power class mask (#212) --- sonic_platform_base/sonic_sfp/qsfp_dd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonic_platform_base/sonic_sfp/qsfp_dd.py b/sonic_platform_base/sonic_sfp/qsfp_dd.py index 37575dee71ac..3ded553323e1 100644 --- a/sonic_platform_base/sonic_sfp/qsfp_dd.py +++ b/sonic_platform_base/sonic_sfp/qsfp_dd.py @@ -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)