File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
platform/broadcom/sonic-platform-modules-dell Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ class Chassis(ChassisBase):
38
38
39
39
oir_fd = - 1
40
40
epoll = - 1
41
-
41
+ REBOOT_CAUSE_PATH = "/host/reboot-cause/platform/reboot_reason"
42
42
_global_port_pres_dict = {}
43
43
44
44
def __init__ (self ):
@@ -239,15 +239,15 @@ def get_reboot_cause(self):
239
239
return (self .REBOOT_CAUSE_NON_HARDWARE , None )
240
240
241
241
if reboot_cause & 0x1 :
242
- return (self .REBOOT_CAUSE_POWER_LOSS , None )
242
+ return (self .REBOOT_CAUSE_POWER_LOSS , "Power on reset" )
243
243
elif reboot_cause & 0x2 :
244
244
return (self .REBOOT_CAUSE_NON_HARDWARE , None )
245
245
elif reboot_cause & 0x4 :
246
246
return (self .REBOOT_CAUSE_HARDWARE_OTHER , "PSU Shutdown" )
247
247
elif reboot_cause & 0x8 :
248
- return (self .REBOOT_CAUSE_THERMAL_OVERLOAD_CPU , None )
248
+ return (self .REBOOT_CAUSE_THERMAL_OVERLOAD_CPU , "Thermal overload" )
249
249
elif reboot_cause & 0x10 :
250
- return (self .REBOOT_CAUSE_WATCHDOG , None )
250
+ return (self .REBOOT_CAUSE_WATCHDOG , "Watchdog reset" )
251
251
elif reboot_cause & 0x20 :
252
252
return (self .REBOOT_CAUSE_HARDWARE_OTHER , "BMC Shutdown" )
253
253
elif reboot_cause & 0x40 :
Original file line number Diff line number Diff line change @@ -309,6 +309,7 @@ def get_num_sfps(self):
309
309
An integer represences the number of SFPs on the chassis.
310
310
"""
311
311
return self ._num_sfps
312
+
312
313
def get_reboot_cause (self ):
313
314
"""
314
315
Retrieves the cause of the previous reboot
@@ -326,15 +327,15 @@ def get_reboot_cause(self):
326
327
return (self .REBOOT_CAUSE_NON_HARDWARE , None )
327
328
328
329
if reboot_cause & 0x1 :
329
- return (self .REBOOT_CAUSE_POWER_LOSS , None )
330
+ return (self .REBOOT_CAUSE_POWER_LOSS , "Power on reset" )
330
331
elif reboot_cause & 0x2 :
331
332
return (self .REBOOT_CAUSE_NON_HARDWARE , None )
332
333
elif reboot_cause & 0x4 :
333
334
return (self .REBOOT_CAUSE_HARDWARE_OTHER , "PSU Shutdown" )
334
335
elif reboot_cause & 0x8 :
335
- return (self .REBOOT_CAUSE_THERMAL_OVERLOAD_CPU , None )
336
+ return (self .REBOOT_CAUSE_THERMAL_OVERLOAD_CPU , "Thermal overload" )
336
337
elif reboot_cause & 0x10 :
337
- return (self .REBOOT_CAUSE_WATCHDOG , None )
338
+ return (self .REBOOT_CAUSE_WATCHDOG , "Watchdog reset" )
338
339
elif reboot_cause & 0x20 :
339
340
return (self .REBOOT_CAUSE_HARDWARE_OTHER , "BMC Shutdown" )
340
341
elif reboot_cause & 0x40 :
You can’t perform that action at this time.
0 commit comments