Skip to content

Commit a0c76b1

Browse files
authored
[Mellanox] support newly added reboot cause (#10531)
- Why I did it Implement newly added reboot causes in PR sonic-net/sonic-platform-common#277 - How I did it Map the reboot cause sysfs to the newly added reboot causes. - How to verify it manual test, check whether the reboot cause is correct after rebooting the switch in various ways. run the community reboot test to see whether the reboot cause checker is passing. Signed-off-by: Kebo Liu <[email protected]>
1 parent a149457 commit a0c76b1

File tree

1 file changed

+13
-14
lines changed
  • platform/mellanox/mlnx-platform-api/sonic_platform

1 file changed

+13
-14
lines changed

platform/mellanox/mlnx-platform-api/sonic_platform/chassis.py

+13-14
Original file line numberDiff line numberDiff line change
@@ -657,24 +657,23 @@ def initialize_reboot_cause(self):
657657
self.reboot_major_cause_dict = {
658658
'reset_main_pwr_fail' : self.REBOOT_CAUSE_POWER_LOSS,
659659
'reset_aux_pwr_or_ref' : self.REBOOT_CAUSE_POWER_LOSS,
660+
'reset_comex_pwr_fail' : self.REBOOT_CAUSE_POWER_LOSS,
660661
'reset_asic_thermal' : self.REBOOT_CAUSE_THERMAL_OVERLOAD_ASIC,
662+
'reset_comex_thermal' : self.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU,
661663
'reset_hotswap_or_wd' : self.REBOOT_CAUSE_WATCHDOG,
664+
'reset_comex_wd' : self.REBOOT_CAUSE_WATCHDOG,
662665
'reset_swb_wd' : self.REBOOT_CAUSE_WATCHDOG,
663-
'reset_sff_wd' : self.REBOOT_CAUSE_WATCHDOG
664-
}
665-
self.reboot_minor_cause_dict = {
666-
'reset_fw_reset' : "Reset by ASIC firmware",
667-
'reset_long_pb' : "Reset by long press on power button",
668-
'reset_short_pb' : "Reset by short press on power button",
669-
'reset_comex_thermal' : "ComEx thermal shutdown",
670-
'reset_comex_pwr_fail' : "ComEx power fail",
671-
'reset_comex_wd' : "Reset requested from ComEx",
672-
'reset_from_asic' : "Reset requested from ASIC",
673-
'reset_reload_bios' : "Reset caused by BIOS reload",
674-
'reset_hotswap_or_halt' : "Reset caused by hotswap or halt",
675-
'reset_from_comex' : "Reset from ComEx",
676-
'reset_voltmon_upgrade_fail': "Reset due to voltage monitor devices upgrade failure"
666+
'reset_sff_wd' : self.REBOOT_CAUSE_WATCHDOG,
667+
'reset_hotswap_or_halt' : self.REBOOT_CAUSE_HARDWARE_OTHER,
668+
'reset_voltmon_upgrade_fail': self.REBOOT_CAUSE_HARDWARE_OTHER,
669+
'reset_reload_bios' : self.REBOOT_CAUSE_HARDWARE_BIOS,
670+
'reset_from_comex' : self.REBOOT_CAUSE_HARDWARE_CPU,
671+
'reset_fw_reset' : self.REBOOT_CAUSE_HARDWARE_RESET_FROM_ASIC,
672+
'reset_from_asic' : self.REBOOT_CAUSE_HARDWARE_RESET_FROM_ASIC,
673+
'reset_long_pb' : self.REBOOT_CAUSE_HARDWARE_BUTTON,
674+
'reset_short_pb' : self.REBOOT_CAUSE_HARDWARE_BUTTON
677675
}
676+
self.reboot_minor_cause_dict = {}
678677
self.reboot_by_software = 'reset_sw_reset'
679678
self.reboot_cause_initialized = True
680679

0 commit comments

Comments
 (0)