diff options
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/ipmi')
3 files changed, 65 insertions, 6 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend index c40ecad7e..fd45b0e1c 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-host_%.bbappend @@ -18,16 +18,12 @@ EXTRA_OECONF:append = " --disable-ipmi-whitelist" RDEPENDS:${PN}:remove = "clear-once" # remove the softpoweroff service since we do not need it -SYSTEMD_SERVICE:${PN}:remove += " \ +SYSTEMD_SERVICE:${PN}:remove = " \ xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" -SYSTEMD_LINK_${PN}:remove += " \ +SYSTEMD_LINK:${PN}:remove = " \ ../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service:obmc-host-shutdown@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \ " -FILES:${PN}:remove = " \ - ${D}${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/ \ - ${D}${systemd_unitdir}/system/obmc-host-shutdown@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service \ - " do_compile:prepend(){ cp -f ${PROJECT_SRC_DIR}/transporthandler_oem.cpp ${S} diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch new file mode 100644 index 000000000..ffa3ab1b0 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb/0003-Fix-for-clearing-outstanding-requests.patch @@ -0,0 +1,62 @@ +From e107bdc375aa23a4c0a3d23978cfe8b378bce09a Mon Sep 17 00:00:00 2001 +From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> +Date: Mon, 20 Sep 2021 14:06:05 +0000 +Subject: [PATCH] Fix for clearing outstanding requests + +IPMB requests were made valid even if there was an error in opening the +mux bus. This fix makes the IPMB requests valid only we were able to +successfully open the Mux fd. + +Tested: +Verified using busctl command. +Command: busctl call xyz.openbmc_project.Ipmi.Channel.Ipmb + /xyz/openbmc_project/Ipmi/Channel/Ipmb org.openbmc.Ipmb + sendRequest yyyyay 0 0x30 0 0x70 2 0 32 +Response: (iyyyyay) 0 49 0 112 193 0 + +Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> +--- + ipmbbridged.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/ipmbbridged.cpp b/ipmbbridged.cpp +index 3ffc1f7..0508fcc 100644 +--- a/ipmbbridged.cpp ++++ b/ipmbbridged.cpp +@@ -801,7 +801,6 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>> + std::shared_ptr<IpmbRequest> request, + const uint8_t pcieSlot) + { +- makeRequestValid(request); + std::filesystem::path p = + "/dev/i2c-mux/PCIE_Mux/Pcie_Slot_" + std::to_string(pcieSlot); + +@@ -825,6 +824,7 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>> + return returnStatus(ipmbResponseStatus::error); + } + ++ makeRequestValid(request); + uint8_t size = buffer.size(); + + const uint8_t slaveAddrIndex = 1; +@@ -894,6 +894,7 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>> + std::vector<uint8_t> buffer(0); + if (request->ipmbToi2cConstruct(buffer) != 0) + { ++ makeRequestInvalid(*request); + return returnStatus(ipmbResponseStatus::error); + } + +@@ -929,7 +930,8 @@ std::tuple<int, uint8_t, uint8_t, uint8_t, uint8_t, std::vector<uint8_t>> + " To avoid log storm, not all the logs for the " + "issue will be shown: "; + } +- if (!(requestAddLogCount % ipmbRequestAddLogInterval) && (requestAddLogCount != 0)) ++ if (!(requestAddLogCount % ipmbRequestAddLogInterval) && ++ (requestAddLogCount != 0)) + { + msgToLog = "requestAdd: There are " + + std::to_string(requestAddLogCount) + +-- +2.17.1 + diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend index 465bd4c64..1ddd13477 100644 --- a/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/ipmi/phosphor-ipmi-ipmb_%.bbappend @@ -3,6 +3,7 @@ SRCREV = "bd78df6be9f677136ca190d50101c328267ddcd2" FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://0001-Add-dbus-method-SlotIpmbRequest.patch \ file://0002-Add-log-count-limitation-to-requestAdd.patch \ + file://0003-Fix-for-clearing-outstanding-requests.patch \ file://ipmb-channels.json \ " |