summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/fans
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/fans')
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control/0001-allow-dbus-sensors-without-thresholds.patch39
-rw-r--r--meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend6
2 files changed, 44 insertions, 1 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control/0001-allow-dbus-sensors-without-thresholds.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control/0001-allow-dbus-sensors-without-thresholds.patch
new file mode 100644
index 000000000..6af0a5702
--- /dev/null
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control/0001-allow-dbus-sensors-without-thresholds.patch
@@ -0,0 +1,39 @@
+From 6b4071c12bdcc3bd20e72a7bd2eed19ff14b97af Mon Sep 17 00:00:00 2001
+From: Zhikui Ren <zhikui.ren@intel.com>
+Date: Wed, 12 May 2021 19:11:08 -0700
+Subject: [PATCH] allow dbus sensors without thresholds
+
+catch dbus exceptions when query for thresholds interfaces.
+log messages and continue.
+
+Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
+---
+ dbus/dbusconfiguration.cpp | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/dbus/dbusconfiguration.cpp b/dbus/dbusconfiguration.cpp
+index 55151d3..fd7a138 100644
+--- a/dbus/dbusconfiguration.cpp
++++ b/dbus/dbusconfiguration.cpp
+@@ -286,13 +286,15 @@ void populatePidInfo(
+ {
+ interface = thresholds::criticalInterface;
+ }
+- const std::string& path = sensorConfig.at(info.inputs.front()).readPath;
+
+- DbusHelper helper(sdbusplus::bus::new_system());
+- std::string service = helper.getService(interface, path);
+ double reading = 0;
+ try
+ {
++ const std::string& path = sensorConfig.at(info.inputs.front()).readPath;
++
++ DbusHelper helper(sdbusplus::bus::new_system());
++ std::string service = helper.getService(interface, path);
++
+ helper.getProperty(service, path, interface, *thresholdProperty,
+ reading);
+ }
+--
+2.17.1
+
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
index ab1cd3742..cdefe246f 100644
--- a/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
+++ b/meta-openbmc-mods/meta-common/recipes-phosphor/fans/phosphor-pid-control_%.bbappend
@@ -5,6 +5,10 @@ SYSTEMD_SERVICE_${PN} = "phosphor-pid-control.service"
EXTRA_OECONF = "--enable-configure-dbus=yes"
SRC_URI = "git://github.com/openbmc/phosphor-pid-control.git"
-SRCREV = "cb4c1a27574a7fe121a851ae7ba67aec254a1129"
+SRCREV = "18d5bb18dcb4ebf7340b0b7a0b39daa887d530ce"
+
+SRC_URI += "\
+ file://0001-allow-dbus-sensors-without-thresholds.patch \
+ "
FILES_${PN} = "${bindir}/swampd ${bindir}/setsensor"