summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barth <msbarth@us.ibm.com>2018-04-02 09:36:33 -0500
committerMatt Spinler <spinler@us.ibm.com>2018-04-13 14:33:41 +0000
commit8729e44a35e0b78c6119c769156cb46bd0987415 (patch)
treefbbb2fdbf8ba1e374e07947909cce3af58415a7c
parent38c74e70d98d5dc9f106868252ea8afd0787430b (diff)
downloadphosphor-hwmon-8729e44a35e0b78c6119c769156cb46bd0987415.tar.gz
phosphor-hwmon-8729e44a35e0b78c6119c769156cb46bd0987415.zip
Remove OCC EAGAIN workaround
The ability to handle an EAGAIN for a sensor from the OCC device can be done by defining the EAGAIN return code(11) as a sensor removal return code within each OCC config file. This return code can be defined at the device level within the config file to be applied across all sensors the OCC provides. Tested: OCC sensors are removed from Dbus when EAGAIN is returned Resolves openbmc/openbmc#2327 Change-Id: If16ec37da6d960d54de1d47af3a39944249df772 Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
-rw-r--r--sysfs.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/sysfs.cpp b/sysfs.cpp
index 5c7dbee..f689314 100644
--- a/sysfs.cpp
+++ b/sysfs.cpp
@@ -338,14 +338,7 @@ int64_t HwmonIO::read(
if (isOCC)
{
- if (rc == EAGAIN)
- {
- // For the OCCs, when an EAGAIN is return, just set the
- // value to 0 (0x00 = sensor is unavailable)
- val = 0;
- break;
- }
- else if (rc == EREMOTEIO)
+ if (rc == EREMOTEIO)
{
// For the OCCs, when an EREMOTEIO is return, set the
// value to 255*1000
OpenPOWER on IntegriCloud