DellEMC: S52xx Reboot cause fix (#10783)
This commit is contained in:
parent
abb977f4c4
commit
9caf12859d
@ -38,7 +38,7 @@ class Chassis(ChassisBase):
|
||||
|
||||
oir_fd = -1
|
||||
epoll = -1
|
||||
|
||||
REBOOT_CAUSE_PATH = "/host/reboot-cause/platform/reboot_reason"
|
||||
_global_port_pres_dict = {}
|
||||
|
||||
def __init__(self):
|
||||
@ -239,15 +239,15 @@ class Chassis(ChassisBase):
|
||||
return (self.REBOOT_CAUSE_NON_HARDWARE, None)
|
||||
|
||||
if reboot_cause & 0x1:
|
||||
return (self.REBOOT_CAUSE_POWER_LOSS, None)
|
||||
return (self.REBOOT_CAUSE_POWER_LOSS, "Power on reset")
|
||||
elif reboot_cause & 0x2:
|
||||
return (self.REBOOT_CAUSE_NON_HARDWARE, None)
|
||||
elif reboot_cause & 0x4:
|
||||
return (self.REBOOT_CAUSE_HARDWARE_OTHER, "PSU Shutdown")
|
||||
elif reboot_cause & 0x8:
|
||||
return (self.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU, None)
|
||||
return (self.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU, "Thermal overload")
|
||||
elif reboot_cause & 0x10:
|
||||
return (self.REBOOT_CAUSE_WATCHDOG, None)
|
||||
return (self.REBOOT_CAUSE_WATCHDOG, "Watchdog reset")
|
||||
elif reboot_cause & 0x20:
|
||||
return (self.REBOOT_CAUSE_HARDWARE_OTHER, "BMC Shutdown")
|
||||
elif reboot_cause & 0x40:
|
||||
|
@ -309,6 +309,7 @@ class Chassis(ChassisBase):
|
||||
An integer represences the number of SFPs on the chassis.
|
||||
"""
|
||||
return self._num_sfps
|
||||
|
||||
def get_reboot_cause(self):
|
||||
"""
|
||||
Retrieves the cause of the previous reboot
|
||||
@ -326,15 +327,15 @@ class Chassis(ChassisBase):
|
||||
return (self.REBOOT_CAUSE_NON_HARDWARE, None)
|
||||
|
||||
if reboot_cause & 0x1:
|
||||
return (self.REBOOT_CAUSE_POWER_LOSS, None)
|
||||
return (self.REBOOT_CAUSE_POWER_LOSS, "Power on reset")
|
||||
elif reboot_cause & 0x2:
|
||||
return (self.REBOOT_CAUSE_NON_HARDWARE, None)
|
||||
elif reboot_cause & 0x4:
|
||||
return (self.REBOOT_CAUSE_HARDWARE_OTHER, "PSU Shutdown")
|
||||
elif reboot_cause & 0x8:
|
||||
return (self.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU, None)
|
||||
return (self.REBOOT_CAUSE_THERMAL_OVERLOAD_CPU, "Thermal overload")
|
||||
elif reboot_cause & 0x10:
|
||||
return (self.REBOOT_CAUSE_WATCHDOG, None)
|
||||
return (self.REBOOT_CAUSE_WATCHDOG, "Watchdog reset")
|
||||
elif reboot_cause & 0x20:
|
||||
return (self.REBOOT_CAUSE_HARDWARE_OTHER, "BMC Shutdown")
|
||||
elif reboot_cause & 0x40:
|
||||
|
Loading…
Reference in New Issue
Block a user