File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
sonic_platform_base/sonic_xcvr Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1056,7 +1056,11 @@ def set_lpmode(self, lpmode):
10561056 # Force module transition to LowPwr under SW control
10571057 lpmode_val = lpmode_val | (1 << CmisApi .LowPwrRequestSW )
10581058 self .xcvr_eeprom .write (consts .MODULE_LEVEL_CONTROL , lpmode_val )
1059- time .sleep (0.1 )
1059+ for retries in range (50 ):
1060+ if self .get_lpmode ():
1061+ break
1062+ time .sleep (0.1 )
1063+
10601064 return self .get_lpmode ()
10611065 else :
10621066 # Force transition from LowPwr to HighPower state under SW control.
@@ -1066,7 +1070,8 @@ def set_lpmode(self, lpmode):
10661070 self .xcvr_eeprom .write (consts .MODULE_LEVEL_CONTROL , lpmode_val )
10671071 time .sleep (1 )
10681072 mstate = self .get_module_state ()
1069- return True if mstate == 'ModuleReady' else False
1073+ return True if mstate == 'ModuleReady' or mstate == 'ModulePwrUp' else False
1074+
10701075 return False
10711076
10721077 def get_loopback_capability (self ):
Original file line number Diff line number Diff line change @@ -96,8 +96,8 @@ def create_xcvr_api(self):
9696 mem_map = Sff8636MemMap (codes )
9797 xcvr_eeprom = XcvrEeprom (self .reader , self .writer , mem_map )
9898 api = Sff8636Api (xcvr_eeprom )
99- # QSFP+
100- elif id == 0x0D :
99+ # QSFP+ or QSFP
100+ elif id == 0x0D or id == 0x0C :
101101 revision_compliance = self ._get_revision_compliance ()
102102 if revision_compliance >= 3 :
103103 codes = Sff8636Codes
You can’t perform that action at this time.
0 commit comments