diff options
author | dheerajpdsk <p.dheeraj.srujan.kumar@intel.com> | 2022-12-03 17:23:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-03 17:23:15 +0300 |
commit | e9e8ce6060c3c89cff2ca181cf95e3dec1a6c78d (patch) | |
tree | ee5b64acbe5374240089bc65c9443dd29df482f8 /meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb | |
parent | e0c224c79550bf49928bfb75f629233b1ef07c7a (diff) | |
parent | 7dd3ed26ca09df0e582be8cc2780bba588bdd11e (diff) | |
download | openbmc-e9e8ce6060c3c89cff2ca181cf95e3dec1a6c78d.tar.xz |
Merge pull request #124 from Intel-BMC/update1-0.92
Update to internal 1-0.92
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch new file mode 100644 index 000000000..d88d45ff5 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch @@ -0,0 +1,62 @@ +From 2939f827a10f0104d06d74d9744dffeae6b1af7a Mon Sep 17 00:00:00 2001 +From: "D M, Karthik" <karthik.d.m@intel.com> +Date: Tue, 14 Jun 2022 09:46:20 +0530 +Subject: [PATCH] PCIeFunctions not showing in Redfish + +For PCIe devices which do not have PCIeType, will not get +PCIeFunctions populated due to a "return" statement while parsing +for PCIeType. + +Missing Data: +"PCIeFunctions": { +"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/<device>/PCIeFunctions" +} + +Tested for all 3 PCIe devices, PCIeFunction details after fixing +{ +"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/S0B3D0", +"@odata.type": "#PCIeDevice.v1_4_0.PCIeDevice", +"DeviceType": "SingleFunction", +"Id": "S0B3D0", +"Manufacturer": "ASPEED Technology Inc.", +"Name": "PCIe Device", +"PCIeFunctions": { +"@odata.id": "/redfish/v1/Systems/system/PCIeDevices/S0B3D0/PCIeFunctions" +} +} + +Signed-off-by: D M, Karthik <karthik.d.m@intel.com> +--- + redfish-core/lib/pcie.hpp | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp +index 1b9e28e..95c2b2c 100644 +--- a/redfish-core/lib/pcie.hpp ++++ b/redfish-core/lib/pcie.hpp +@@ -176,6 +176,11 @@ inline void requestRoutesSystemPCIeDevice(App& app) + {"Name", "PCIe Device"}, + {"Id", device}}; + ++ asyncResp->res.jsonValue["PCIeFunctions"] = { ++ {"@odata.id", ++ "/redfish/v1/Systems/system/PCIeDevices/" + ++ device + "/PCIeFunctions"}}; ++ + if (std::string* property = std::get_if<std::string>( + &pcieDevProperties["Manufacturer"]); + property) +@@ -226,10 +231,6 @@ inline void requestRoutesSystemPCIeDevice(App& app) + .jsonValue["PCIeInterface"]["PCIeType"] = + *generationInUse; + } +- asyncResp->res.jsonValue["PCIeFunctions"] = { +- {"@odata.id", +- "/redfish/v1/Systems/system/PCIeDevices/" + +- device + "/PCIeFunctions"}}; + }; + std::string escapedPath = std::string(pciePath) + "/" + device; + dbus::utility::escapePathForDbus(escapedPath); +-- +2.20.0.windows.1 + |