diff options
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control')
-rwxr-xr-x | meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh | 13 |
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 |