File tree 2 files changed +11
-4
lines changed
sonic_platform_base/sonic_xcvr
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -898,11 +898,18 @@ def set_lpmode(self, lpmode):
898
898
if lpmode_val is not None :
899
899
if lpmode is True :
900
900
lpmode_val = lpmode_val | (1 << 4 )
901
+ self .xcvr_eeprom .write (consts .MODULE_LEVEL_CONTROL , lpmode_val )
902
+ time .sleep (0.1 )
903
+ return self .get_lpmode ()
901
904
else :
902
905
lpmode_val = lpmode_val & ~ (1 << 4 )
903
- self .xcvr_eeprom .write (consts .MODULE_LEVEL_CONTROL , lpmode_val )
904
- time .sleep (0.1 )
905
- return self .get_lpmode ()
906
+ self .xcvr_eeprom .write (consts .MODULE_LEVEL_CONTROL , lpmode_val )
907
+ time .sleep (1 )
908
+ lpmode = self .xcvr_eeprom .read (consts .TRANS_MODULE_STATUS_FIELD )
909
+ if lpmode is not None :
910
+ if lpmode .get ('ModuleState' ) == 'ModuleReady' :
911
+ return True
912
+ return False
906
913
return False
907
914
908
915
def get_loopback_capability (self ):
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ def set_lpmode(self, lpmode):
144
144
vendors has to implement accordingly.
145
145
"""
146
146
api = self .get_xcvr_api ()
147
- return api .set_lp_mode (lpmode ) if api is not None else None
147
+ return api .set_lpmode (lpmode ) if api is not None else None
148
148
149
149
def set_optoe_write_max (self , write_max ):
150
150
sys_path = self .get_eeprom_path ()
You can’t perform that action at this time.
0 commit comments