summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaptor Engineering Development Team <support@raptorengineering.com>2018-04-14 21:46:35 -0500
committerRaptor Engineering Development Team <support@raptorengineering.com>2018-04-14 21:48:40 -0500
commitfbd986616964f67f7d2aaf9b73f8305fa8355257 (patch)
tree254f6294b5591793977604fc32721fb82478fe57
parent78a029669a8354c42ca9fa1af4d94e4def54dccf (diff)
downloadtalos-openbmc-fbd986616964f67f7d2aaf9b73f8305fa8355257.tar.gz
talos-openbmc-fbd986616964f67f7d2aaf9b73f8305fa8355257.zip
Enhance OCC communication failure error recovery
-rwxr-xr-xmeta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh13
1 files changed, 13 insertions, 0 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 08d1813bd..9be4e807e 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
@@ -49,6 +49,12 @@ if [ "$value" == "true" ]; then
# Wait 5 seconds before restarting fan controller
sleep 5
systemctl restart phosphor-fan-control@0.service
+else
+ # Unbind all OCC drivers to avoid bus contention on next IPL
+ echo occ1-dev0 > /sys/bus/platform/drivers/occ-hwmon/unbind || true
+ echo occ2-dev0 > /sys/bus/platform/drivers/occ-hwmon/unbind || true
+ echo sbefifo1-dev0 > /sys/bus/platform/drivers/occ/unbind || true
+ echo sbefifo2-dev0 > /sys/bus/platform/drivers/occ/unbind || true
fi
if [ "$1" == "watchdog" ]; then
@@ -81,6 +87,13 @@ if [ "$1" == "watchdog" ]; then
busctl tree $OCC_CONTROL_SERVICE --list | grep occ | xargs -r -n1 -I{} \
busctl set-property $OCC_CONTROL_SERVICE {} org.open_power.OCC.Status \
OccActive b 'false'
+ # Give enough time for the OCC control service to attempt unload before forcible unbind
+ sleep 5
+ # Unbind all OCC drivers
+ echo occ1-dev0 > /sys/bus/platform/drivers/occ-hwmon/unbind || true
+ echo occ2-dev0 > /sys/bus/platform/drivers/occ-hwmon/unbind || true
+ echo sbefifo1-dev0 > /sys/bus/platform/drivers/occ/unbind || true
+ echo sbefifo2-dev0 > /sys/bus/platform/drivers/occ/unbind || true
# Wait 10 seconds for OCC to figure out something has happened / bus contention to stop
sleep 10
openpower-proc-control scanFSI
OpenPOWER on IntegriCloud