diff options
author | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-01-22 02:31:50 -0600 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-04-12 21:09:48 -0500 |
commit | 7cfdf23443091c8805aaee7d1b96e14df5a1946b (patch) | |
tree | 258690ce8787b27a153c01bff57ab0eadbb4de7e | |
parent | 4396a32b21713871ed7e79d8ee6cbbc0de8b1031 (diff) | |
download | talos-openbmc-7cfdf23443091c8805aaee7d1b96e14df5a1946b.tar.gz talos-openbmc-7cfdf23443091c8805aaee7d1b96e14df5a1946b.zip |
Reset OCC on error detection
This fixes a corner case where a hung OCC did not report rising core temperatures
and the fans failed to react as a result
-rwxr-xr-x | meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh index 6a511c132..08d1813bd 100755 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh @@ -57,11 +57,20 @@ if [ "$1" == "watchdog" ]; then sleep 5 OCC_FAULT=0 - if [ ! -e /sys/bus/platform/drivers/occ/sbefifo1-dev0/occ1-dev0/occ_status ]; then + if [ ! -e /sys/bus/platform/drivers/occ/sbefifo1-dev0/occ1-dev0/occ_error ]; then OCC_FAULT=1 + else + STATUS=$(cat /sys/bus/platform/drivers/occ/sbefifo1-dev0/occ1-dev0/occ_error) + if [ $STATUS != 0 ]; then + OCC_FAULT=1 + fi fi if [ $CPU_COUNT -gt 1 ]; then - if [ ! -e /sys/bus/platform/drivers/occ/sbefifo2-dev0/occ2-dev0/occ_status ]; then + if [ ! -e /sys/bus/platform/drivers/occ/sbefifo2-dev0/occ2-dev0/occ_error ]; then + OCC_FAULT=1 + fi + else + if [ $STATUS != 0 ]; then OCC_FAULT=1 fi fi |