Skip to content

Commit

Permalink
support new reboot cause
Browse files Browse the repository at this point in the history
Signed-off-by: Kebo Liu <kebol@nvidia.com>
  • Loading branch information
keboliu committed Apr 13, 2022
1 parent fb25f13 commit 38c53d5
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,24 +657,23 @@ def initialize_reboot_cause(self):
self.reboot_major_cause_dict = {
'reset_main_pwr_fail' : self.REBOOT_CAUSE_POWER_LOSS,
'reset_aux_pwr_or_ref' : self.REBOOT_CAUSE_POWER_LOSS,
'reset_comex_pwr_fail' : self.REBOOT_CAUSE_POWER_LOSS,
'reset_asic_thermal' : self.REBOOT_CAUSE_THERMAL_OVERLOAD_ASIC,
'reset_comex_thermal' : self.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU,
'reset_hotswap_or_wd' : self.REBOOT_CAUSE_WATCHDOG,
'reset_comex_wd' : self.REBOOT_CAUSE_WATCHDOG,
'reset_swb_wd' : self.REBOOT_CAUSE_WATCHDOG,
'reset_sff_wd' : self.REBOOT_CAUSE_WATCHDOG
}
self.reboot_minor_cause_dict = {
'reset_fw_reset' : "Reset by ASIC firmware",
'reset_long_pb' : "Reset by long press on power button",
'reset_short_pb' : "Reset by short press on power button",
'reset_comex_thermal' : "ComEx thermal shutdown",
'reset_comex_pwr_fail' : "ComEx power fail",
'reset_comex_wd' : "Reset requested from ComEx",
'reset_from_asic' : "Reset requested from ASIC",
'reset_reload_bios' : "Reset caused by BIOS reload",
'reset_hotswap_or_halt' : "Reset caused by hotswap or halt",
'reset_from_comex' : "Reset from ComEx",
'reset_voltmon_upgrade_fail': "Reset due to voltage monitor devices upgrade failure"
'reset_sff_wd' : self.REBOOT_CAUSE_WATCHDOG,
'reset_hotswap_or_halt' : self.REBOOT_CAUSE_HARDWARE_OTHER,
'reset_voltmon_upgrade_fail': self.REBOOT_CAUSE_HARDWARE_OTHER,
'reset_reload_bios' : self.REBOOT_CAUSE_HARDWARE_BIOS,
'reset_from_comex' : self.REBOOT_CAUSE_HARDWARE_CPU,
'reset_fw_reset' : self.REBOOT_CAUSE_HARDWARE_RESET_FROM_ASIC,
'reset_from_asic' : self.REBOOT_CAUSE_HARDWARE_RESET_FROM_ASIC,
'reset_long_pb' : self.REBOOT_CAUSE_HARDWARE_BUTTON,
'reset_short_pb' : self.REBOOT_CAUSE_HARDWARE_BUTTON
}
self.reboot_minor_cause_dict = {}
self.reboot_by_software = 'reset_sw_reset'
self.reboot_cause_initialized = True

Expand Down

0 comments on commit 38c53d5

Please sign in to comment.