PEL: Ignore hotplugged FRUs owned by PLDM

When the code is watching for newly plugged fans or power supplies, it
can ignore ones hosted by the PLDM daemon because those are in IO
expansion drawers and nothing needs to be done when those are added.

In fact, calling into PLDM to get the location code can cause a D-Bus
deadlock because when this code runs it can be in the middle of PLDM
calling into the logging daemon to create event logs.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I0ebb4811a2d115692acfa3301aa53e6d19e635de
diff --git a/extensions/openpower-pels/data_interface.cpp b/extensions/openpower-pels/data_interface.cpp
index 9850a9b..3d4a298 100644
--- a/extensions/openpower-pels/data_interface.cpp
+++ b/extensions/openpower-pels/data_interface.cpp
@@ -47,6 +47,7 @@
 constexpr auto hwIsolation = "org.open_power.HardwareIsolation";
 constexpr auto biosConfigMgr = "xyz.openbmc_project.BIOSConfigManager";
 constexpr auto bootRawProgress = "xyz.openbmc_project.State.Boot.Raw";
+constexpr auto pldm = "xyz.openbmc_project.PLDM";
 } // namespace service_name
 
 namespace object_path
@@ -975,6 +976,15 @@
 
     try
     {
+        auto service = getService(path, interface::locCode);
+
+        // If the hotplugged FRU is hosted by PLDM, then it is
+        // in an IO expansion drawer and we don't care about it.
+        if (service == service_name::pldm)
+        {
+            return;
+        }
+
         locCode = getLocationCode(path);
     }
     catch (const sdbusplus::exception_t& e)