summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces
diff options
context:
space:
mode:
authoreportnov <eportnov@ibs.ru>2022-08-18 15:56:16 +0300
committereportnov <eportnov@ibs.ru>2022-08-18 15:56:16 +0300
commit9cab4b0d6642995116ff405c159cf461728af8ab (patch)
tree7cb50647a584498b261c9c600ca2cb33269e4252 /meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces
parent6474ab8c5536e19ce577d78b01696367d383a658 (diff)
downloadopenbmc-9cab4b0d6642995116ff405c159cf461728af8ab.tar.xz
Add pcie human names
Diffstat (limited to 'meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces')
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0008-Add-pcie-device-names.patch49
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend1
2 files changed, 50 insertions, 0 deletions
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0008-Add-pcie-device-names.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0008-Add-pcie-device-names.patch
new file mode 100644
index 0000000000..f39738bc69
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0008-Add-pcie-device-names.patch
@@ -0,0 +1,49 @@
+From 3cf6e1d03527c9476f131853d8d1af45dc845922 Mon Sep 17 00:00:00 2001
+From: eportnov <eportnov@ibs.ru>
+Date: Thu, 18 Aug 2022 15:49:51 +0300
+Subject: [PATCH] Add pcie device names
+
+---
+ redfish-core/lib/pcie.hpp | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
+index 1f04f5f9..30d7d7a6 100644
+--- a/redfish-core/lib/pcie.hpp
++++ b/redfish-core/lib/pcie.hpp
+@@ -228,6 +228,16 @@ inline void requestRoutesSystemPCIeDevice(App& app)
+ asyncResp->res.jsonValue["PCIeInterface"]["PCIeType"] =
+ *generationInUse;
+ }
++ if (property.first == "Device")
++ {
++ if (propertyString == nullptr)
++ {
++ messages::internalError(asyncResp->res);
++ return;
++ }
++
++ asyncResp->res.jsonValue["Device"] = *propertyString;
++ }
+ }
+ };
+ std::string escapedPath = std::string(pciePath) + "/" + device;
+@@ -368,6 +378,7 @@ inline void requestRoutesSystemPCIeFunction(App& app)
+ // ID
+ std::string functionName = "Function" + function;
+ std::string devIDProperty = functionName + "DeviceId";
++ std::string devNameProperty = functionName + "DeviceName";
+
+ auto find = std::find_if(pcieDevProperties.begin(), pcieDevProperties.end(),[devIDProperty](auto const& propEntry)
+ { return propEntry.first == devIDProperty; });
+@@ -402,6 +413,10 @@ inline void requestRoutesSystemPCIeFunction(App& app)
+ {
+ asyncResp->res.jsonValue["DeviceId"] = *strProperty;
+ }
++ if (property.first == devNameProperty)
++ {
++ asyncResp->res.jsonValue["DeviceName"] = *strProperty;
++ }
+ if (property.first == functionName + "VendorId")
+ {
+ asyncResp->res.jsonValue["VendorId"] = *strProperty;
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
index 46cf6f3a30..296a4c070b 100644
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -8,6 +8,7 @@ SRC_URI += "\
file://0005-Fix-keep-and-re-send-initial-negotiation-data-from-W.patch \
file://0006-fix-bug-empty-pcie-functions.patch \
file://0007-Removed-non-working-boot-override-modes.patch \
+ file://0008-Add-pcie-device-names.patch \
"
EXTRA_OEMESON += "\