summaryrefslogtreecommitdiffstats
path: root/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor
diff options
context:
space:
mode:
authorLei YU <mine260309@gmail.com>2018-04-02 14:18:26 +0800
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-04-03 20:16:06 +0000
commit1073d5fd0874e0fc99acfe853c9b072b160b440c (patch)
treed5ad2a3770793cfd3448056655c7b52f630ad0c4 /meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor
parent3a3497cf098146720306c993f913f13e7cf3c54b (diff)
downloadtalos-openbmc-1073d5fd0874e0fc99acfe853c9b072b160b440c.tar.gz
talos-openbmc-1073d5fd0874e0fc99acfe853c9b072b160b440c.zip
meta-romulus hwmon: Use negative-errno-on-fail config
In phosphor-hwmon, the config "--enable-negative-errno-on-fail" is introduced for sensors that should return errno instead of failing and exiting. Enable this config for Romulus so the fan sensors are working, otherwise hwmon will fail and exit when fans are not working. Tested: Verify that the fan_tach sensors return -ETIMEOUT when host is powered off and do not exit with failure. Change-Id: I0d52a2b1a7fb4bf9fc542de6a88823b36bd2bc48 Signed-off-by: Lei YU <mine260309@gmail.com>
Diffstat (limited to 'meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor')
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%.bbappend7
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/0001-sysfs-Return-ETIMEDOUT-instead-of-throw-exception.patch35
2 files changed, 1 insertions, 41 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
index d5a2ebee4..536d797fa 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%.bbappend
@@ -1,11 +1,6 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-# Pin the revision so the patch is guaranteed to be appliable
-# TODO: Remove this when the error handling in hwmon is done:
-# https://gerrit.openbmc-project.xyz/#/c/8073/
-SRCREV = "a23babd6952cb21397d6aa408a827047d1de81de"
-
-SRC_URI += " file://0001-sysfs-Return-ETIMEDOUT-instead-of-throw-exception.patch"
+EXTRA_OECONF_append_romulus = " --enable-negative-errno-on-fail"
CHIPS = " \
i2c@1e78a000/i2c-bus@440/w83773g@4c \
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/0001-sysfs-Return-ETIMEDOUT-instead-of-throw-exception.patch b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/0001-sysfs-Return-ETIMEDOUT-instead-of-throw-exception.patch
deleted file mode 100644
index 67268b3ea..000000000
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/sensors/phosphor-hwmon%/0001-sysfs-Return-ETIMEDOUT-instead-of-throw-exception.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 26989b5e7c85ac1d5715a5ef2667335061920e96 Mon Sep 17 00:00:00 2001
-From: Lei YU <mine260309@gmail.com>
-Date: Thu, 23 Nov 2017 16:14:51 +0800
-Subject: [PATCH] sysfs: Return -ETIMEDOUT instead of throw exception
-
-Aspeed fan tach gives ETIMEDOUT error when host is powered off, it
-causes phosphor-hwmon exit with read failure exception.
-Make it return -ETIMEDOUT so that it gives negative value for fan speed
-as workaround.
-
-Signed-off-by: Lei YU <mine260309@gmail.com>
----
- sysfs.cpp | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/sysfs.cpp b/sysfs.cpp
-index 369d2e7..f390de6 100644
---- a/sysfs.cpp
-+++ b/sysfs.cpp
-@@ -308,6 +308,12 @@ uint32_t HwmonIO::read(
- throw std::system_error(rc, std::generic_category());
- }
-
-+ if (rc == ETIMEDOUT)
-+ {
-+ // Workaround for AST fan tach driver
-+ // that returns -ETIMEDOUT when fan is not runnings
-+ return -rc;
-+ }
- --retries;
- std::this_thread::sleep_for(delay);
- continue;
---
-1.9.1
-
OpenPOWER on IntegriCloud