summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-01-22 02:31:50 -0600
committerRaptor Engineering Development Team <support@raptorengineering.com>2018-01-22 03:09:39 -0600
commit1110345dad3491c496a1b1334e8a21aff3f2b6f6 (patch)
tree8d8a3717dd31c1e5bf3c2078fdd21c87d9069ac0 /meta-openbmc-machines/meta-openpower
parentb2ecbc58ca17430edd682b5cc424991cfeef0e45 (diff)
downloadtalos-openbmc-1110345dad3491c496a1b1334e8a21aff3f2b6f6.tar.gz
talos-openbmc-1110345dad3491c496a1b1334e8a21aff3f2b6f6.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
Diffstat (limited to 'meta-openbmc-machines/meta-openpower')
-rwxr-xr-xmeta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh13
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
OpenPOWER on IntegriCloud