diff options
Diffstat (limited to 'meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0022-add-caching-pcie.patch')
-rw-r--r-- | meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0022-add-caching-pcie.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0022-add-caching-pcie.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0022-add-caching-pcie.patch new file mode 100644 index 0000000000..85cd43d653 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0022-add-caching-pcie.patch @@ -0,0 +1,40 @@ +From b172d7a4a9413a2877681ea1cfc707ad315e39f5 Mon Sep 17 00:00:00 2001 +From: claiff <claiff@mail.ru> +Date: Fri, 14 Oct 2022 12:46:48 +0300 +Subject: [PATCH] add caching pcie + +--- + redfish-core/lib/pcie.hpp | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp +index 30d7d7a6..a58c46bf 100644 +--- a/redfish-core/lib/pcie.hpp ++++ b/redfish-core/lib/pcie.hpp +@@ -306,7 +306,7 @@ inline void requestRoutesSystemPCIeFunctionCollection(App& app) + // Check if this function exists by looking for a + // device ID + std::string devIDProperty = +- "Function" + std::to_string(functionNum) + "DeviceId"; ++ "Function" + std::to_string(functionNum) + "DeviceName"; + + auto find = std::find_if(pcieDevProperties.begin(), pcieDevProperties.end(),[devIDProperty](auto const& propEntry) + { return propEntry.first == devIDProperty; }); +@@ -377,14 +377,13 @@ inline void requestRoutesSystemPCIeFunction(App& app) + // Check if this function exists by looking for a device + // 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; }); ++ auto find = std::find_if(pcieDevProperties.begin(), pcieDevProperties.end(),[devNameProperty](auto const& propEntry) ++ { return propEntry.first == devNameProperty; }); + if(find == pcieDevProperties.end()) + { +- BMCWEB_LOG_DEBUG << "property" << devIDProperty << "not found"; ++ BMCWEB_LOG_DEBUG << "property" << devNameProperty << "not found"; + return; + } + auto property_func = std::get_if<std::string>(&find->second); |