summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0022-add-caching-pcie.patch
blob: 85cd43d653649a6fbfa91c26a5a33dd674457ad4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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);