From 1d7fe62be329e47b0e7baeb0f06ba077b0fe5ab8 Mon Sep 17 00:00:00 2001 From: George Hung Date: Thu, 3 Jun 2021 17:17:53 +0800 Subject: meta-quanta: gbs: remove patches for phosphor-ipmi-host remove patches: - Update IPMI Chassis Control command transition requests - Add Chassis State Transition interface - Update Host State Transition function - Fix issues and support signed sensor values Signed-off-by: George Hung Change-Id: I8f9f7d576ef7f7672bedf803ee73f331f96768ff --- ...01-Add-Chassis-State-Transition-interface.patch | 79 ---------------------- 1 file changed, 79 deletions(-) delete mode 100644 meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-Chassis-State-Transition-interface.patch (limited to 'meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-Chassis-State-Transition-interface.patch') diff --git a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-Chassis-State-Transition-interface.patch b/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-Chassis-State-Transition-interface.patch deleted file mode 100644 index 74f982b33..000000000 --- a/meta-quanta/meta-gbs/recipes-phosphor/ipmi/phosphor-ipmi-host/0001-Add-Chassis-State-Transition-interface.patch +++ /dev/null @@ -1,79 +0,0 @@ -From a1f9d797753e32b36e08e7d611ff88b10e9bbad2 Mon Sep 17 00:00:00 2001 -From: "Jason M. Bills" -Date: Thu, 30 Jan 2020 16:18:33 -0800 -Subject: [PATCH 1/3] Add Chassis State Transition interface - -This adds the Chassis State Transition interface in preparation -to support the mapping defined in the design document below. - -ref: https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/22358 - -Tested: -Ran each IPMI chassis control command to confirm the expected -behavior: -ipmitool power on: system is powered-on -ipmitool power off: system is forced off -ipmitool power cycle: system is forced off then powered-on -ipmitool power reset: system is hard reset -ipmitool power soft: soft power-off requested from system software - -Change-Id: I6acfb795a9a33ff5227a5d6e1830774ab732ac0c -Signed-off-by: Jason M. Bills ---- - chassishandler.cpp | 33 +++++++++++++++++++++++++++++++++ - 1 file changed, 33 insertions(+) - -diff --git a/chassishandler.cpp b/chassishandler.cpp -index 0d318647..fdbb9fa5 100644 ---- a/chassishandler.cpp -+++ b/chassishandler.cpp -@@ -31,6 +31,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -865,6 +866,38 @@ int initiate_state_transition(State::Host::Transition transition) - return rc; - } - -+//------------------------------------------ -+// Calls into Chassis State Manager Dbus object -+//------------------------------------------ -+int initiateChassisStateTransition(State::Chassis::Transition transition) -+{ -+ // OpenBMC Chassis State Manager dbus framework -+ constexpr auto chassisStatePath = "/xyz/openbmc_project/state/chassis0"; -+ constexpr auto chassisStateIntf = "xyz.openbmc_project.State.Chassis"; -+ -+ auto service = -+ ipmi::getService(*getSdBus(), chassisStateIntf, chassisStatePath); -+ -+ // Convert to string equivalent of the passed in transition enum. -+ auto request = State::convertForMessage(transition); -+ -+ try -+ { -+ ipmi::setDbusProperty(*getSdBus(), service, chassisStatePath, -+ chassisStateIntf, "RequestedPowerTransition", -+ request); -+ } -+ catch (std::exception& e) -+ { -+ log( -+ "Failed to initiate transition", -+ entry("EXCEPTION=%s, REQUEST=%s", e.what(), request.c_str())); -+ return -1; -+ } -+ -+ return 0; -+} -+ - //------------------------------------------ - // Set Enabled property to inform NMI source - // handling to trigger a NMI_OUT BSOD. --- -2.21.0 - -- cgit v1.2.3