summaryrefslogtreecommitdiff
path: root/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset
diff options
context:
space:
mode:
authorBonnieLo-wiwynn <Bonnie_Lo@wiwynn.com>2023-03-31 09:27:50 +0300
committerDelphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>2023-08-09 10:48:32 +0300
commit052ee4167fe8c7a92f234865dcf8389ec1a24d90 (patch)
treed9cce3a4c7b65f49edcfd14920c523f27006062a /meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset
parent9b3d22e7ac52442c123bee0c737f6b81ed6108df (diff)
downloadopenbmc-052ee4167fe8c7a92f234865dcf8389ec1a24d90.tar.xz
meta-facebook: greatlakes: fix power control command
-Add condition for checking ipmb commands result. -Fix wrong command call for chassis power off. Tested: tested and verified on grwatlakes platform. Change-Id: Id7262df4f8687b34e5ca0d6eabb9914e332dfe1a Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Diffstat (limited to 'meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset')
-rw-r--r--meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset10
1 files changed, 8 insertions, 2 deletions
diff --git a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset
index 938c914f95..b90c5f0bf4 100644
--- a/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset
+++ b/meta-facebook/recipes-phosphor/state/phosphor-state-manager/greatlakes/host-powerreset
@@ -12,8 +12,14 @@ host-reboot()
{
for reset_cmd in "${reset_seq[@]}"
do
- result="$(busctl call "$SERVICE" "$OBJECT_PATH" "$INTERFACE" sendRequest yyyyay "$SLOT_ID" "$NETFN" "$LUN" "$CMD" "$DATA_LEN" 0x01 0x42 0x01 0 "$reset_cmd")"
- echo "$result"
+ response="$(busctl call "$SERVICE" "$OBJECT_PATH" "$INTERFACE" sendRequest yyyyay "$SLOT_ID" "$NETFN" "$LUN" "$CMD" "$DATA_LEN" 0x01 0x42 0x01 0 "$reset_cmd")"
+ echo "$response"
+ result=$(echo "$response" | cut -d" " -f "$IPMB_CMD_COMPLETE_CODE_INDEX")
+ if [ "$result" -ne 0 ]
+ then
+ echo "Failed to send ipmb command"
+ exit 1
+ fi
if [ "$reset_cmd" == "$POWER_BTN_LOW" ]
then
sleep "$1"