New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phosphor-hwmon: Set a Fault/Functional property when the sysfs fault property is set #2329
Comments
This is a temporary fix until the following issues are completed: openbmc/openbmc#2327 openbmc/openbmc#2329 When an EAGAIN or an EREMOTEIO return code is received by hwmon from the OCC driver in the 4.13 kernel, they should be translated to an unavailable sensor(0x00) and failed sensor(0xFF) scaled values respectively. This will keep the OCC hwmon instance running and allow applications to continue using these sensors as they were reported under the mainline openbmc/linux 4.10 kernel. Tested: Verified return codes are caught and sensor value modified Change-Id: Ie61859863e7d88878caa942e5f5b062acabe67aa Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
This is a temporary fix until the following issues are completed: openbmc/openbmc#2327 openbmc/openbmc#2329 When an EAGAIN or an EREMOTEIO return code is received by hwmon from the OCC driver in the 4.13 kernel, they should be translated to an unavailable sensor(0x00) and failed sensor(0xFF) scaled values respectively. This will keep the OCC hwmon instance running and allow applications to continue using these sensors as they were reported under the mainline openbmc/linux 4.10 kernel. Tested: Verified return codes are caught and sensor value modified Change-Id: Ie61859863e7d88878caa942e5f5b062acabe67aa Signed-off-by: Matthew Barth <msbarth@us.ibm.com> Signed-off-by: Doyle Huang <doyle.sy.huang@mail.foxconn.com>
When an associated fault file for a sensor exists, the OperationalStatus interface will be added with the Functional property set to the corresponding value within that fault file. The interface will not be added to sensors that do not provide an associated fault file. If a sensors if marked faulted (non-functional), its associated input file will not be read. When the sensor is initially faulted, the value will default to 0 and at anytime during the monitoring loop a sensor is faulted, its value will not be read from the input file and updated on dbus.
|
https://gerrit.openbmc-project.xyz/10315 Refresh sensor functional state |
With openbmc/openbmc#2329, an OCC sensor value will not be read when the associated fault file is set to true. This will set the value to 0 when a sensor is faulted at startup or not update the previous value during the monitoring loop if the OCC sensor becomes faulted. Applications(i.e. fan control) needing to react to a faulted OCC sensor can subscribe to property changed signals on the OperationalStatus Functional property for the sensor's dbus object. Tested: A faulted OCC sensor has a non-functional status on dbus Change-Id: Ia43ebb1e0fe0227797bc4034e617ac357edd348d Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
The hwmon documentation states:
phosphor-hwmon should check for that fault status, if it exists, when reading a sensor and set a new D-Bus property on that sensor (Maybe using the OperationalStatus interface) to reflect that fault. The sensor object would not be removed from D-Bus, and the process should no longer exit.
Things to consider:
The text was updated successfully, but these errors were encountered: