From 7dd3ed26ca09df0e582be8cc2780bba588bdd11e Mon Sep 17 00:00:00 2001 From: P Dheeraj Srujan Kumar Date: Fri, 2 Dec 2022 23:23:31 +0530 Subject: Update to internal 1-0.92 Signed-off-by: P Dheeraj Srujan Kumar --- ...0036-PCIeFunctions-not-showing-in-Redfish.patch | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0036-PCIeFunctions-not-showing-in-Redfish.patch') 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" +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//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 +--- + 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( + &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 + -- cgit v1.2.3