Skip to content

Commit

Permalink
[202311_RC] Add debug info for issue 3959003
Browse files Browse the repository at this point in the history
  • Loading branch information
keboliu committed Jul 5, 2024
1 parent 2708da1 commit bad8db6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions platform/mellanox/mlnx-platform-api/sonic_platform/sfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,11 @@ def get_presence(self):
"""
presence_sysfs = f'/sys/module/sx_core/asic0/module{self.sdk_index}/hw_present' if self.is_sw_control() else f'/sys/module/sx_core/asic0/module{self.sdk_index}/present'
if utils.read_int_from_file(presence_sysfs) != 1:
self.not_presence_reason = f'{presence_sysfs} value is not 1'
return False
eeprom_raw = self._read_eeprom(0, 1, log_on_error=False)
if eeprom_raw is None:
self.not_presence_reason = 'eeprom is not available'
return eeprom_raw is not None

# read eeprom specfic bytes beginning from offset with size as num_bytes
Expand Down

0 comments on commit bad8db6

Please sign in to comment.