Skip presence detect and PEL for pass1 PCIe cards
Presence pin on pass1 planar does not reflect the true state of the
slot. It does not guarantee if the card is actually present in the slot
or not. Hence, the presence pin check is irrelevant in these scenarios
and is being skipped before enabling the line for VPD collection.
Availability of EEPROM after enabling the line should confirm if the
card needs to be collected or not.
Also, PCIe cards on pass1 is expected to have invalid VPD, avoiding
logging of PELs for those error scenarios.
Change-Id: Ia646b7d442a94fadea6b4c78d1d97c5a214579cb
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
diff --git a/vpd-manager/src/worker.cpp b/vpd-manager/src/worker.cpp
index ff92264..d1bd00c 100644
--- a/vpd-manager/src/worker.cpp
+++ b/vpd-manager/src/worker.cpp
@@ -1449,6 +1449,24 @@
// based on status of execution.
if (typeid(ex) == std::type_index(typeid(DataException)))
{
+ // In case of pass1 planar, VPD can be corrupted on PCIe cards. Skip
+ // logging error for these cases.
+ if (vpdSpecificUtility::isPass1Planar())
+ {
+ const std::string& l_invPathLeafValue =
+ sdbusplus::message::object_path(
+ jsonUtility::getInventoryObjPathFromJson(m_parsedJson,
+ i_vpdFilePath))
+ .filename();
+
+ if ((l_invPathLeafValue.find("pcie_card", 0) !=
+ std::string::npos))
+ {
+ // skip logging any PEL for PCIe cards on pass 1 planar.
+ return std::make_tuple(false, i_vpdFilePath);
+ }
+ }
+
// TODO: Add custom handling
logging::logMessage(ex.what());
}