diff options
author | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-01-21 21:15:13 -0600 |
---|---|---|
committer | Raptor Engineering Development Team <support@raptorengineering.com> | 2018-01-21 21:15:13 -0600 |
commit | 6f9e50b75a4c605552252ed5d113756b51b7a51a (patch) | |
tree | 301872e2fcd002cf7c06a12657d1049aff6d2b33 /meta-openbmc-machines | |
parent | 6ea62d362851af857b86b20ab1d272ad40dcec01 (diff) | |
download | talos-openbmc-6f9e50b75a4c605552252ed5d113756b51b7a51a.tar.gz talos-openbmc-6f9e50b75a4c605552252ed5d113756b51b7a51a.zip |
Restart OCC service before restarting fan controller
This fixes fan control failing on boot due to offline OCC services
Diffstat (limited to 'meta-openbmc-machines')
-rwxr-xr-x | meta-openbmc-machines/meta-openpower/common/recipes-phosphor/occ/openpower-occ-control/occ-active.sh | 19 |
1 files changed, 17 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 c4c791f85..9e4c4bec2 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 @@ -19,11 +19,14 @@ OCC_CONTROL_SERVICE="org.open_power.OCC.Control" if [ "$value" == "true" ]; then # Rescan bus to find OCCs openpower-proc-control scanFSI + # Wait 5 seconds before restarting fan controller + sleep 5 + systemctl restart phosphor-fan-control@0.service fi 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 $value + busctl set-property $OCC_CONTROL_SERVICE {} org.open_power.OCC.Status \ + OccActive b $value if [ "$1" == "watchdog" ]; then # Start watchdog @@ -31,7 +34,19 @@ if [ "$1" == "watchdog" ]; then sleep 5 if [ ! -e /sys/bus/platform/drivers/occ/sbefifo1-dev0/occ1-dev0/occ_status ]; then # OCC driver failed. Rescan bus to recover. + # Disable existing OCC service + 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' + # Wait 10 seconds for OCC to figure out something has happened / bus contention to stop + sleep 10 openpower-proc-control scanFSI + # Re-enable OCC service + 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 'true' + # Restart fan controller + systemctl restart phosphor-fan-control@0.service fi done fi |