<div dir="ltr">Hello everyone,<div><br></div><div>I'm working on an alternative to NEGATIVE_ERRNO_ON_FAIL for sensor read failures <<a href="https://github.com/openbmc/phosphor-hwmon/issues/10">https://github.com/openbmc/phosphor-hwmon/issues/10</a>>.</div><div><br></div><div>I'm hoping to change the default behavior of phosphor-host-ipmid upon sensor read failures and wanted to receive some feedback:</div><div><br></div><div>Currently if there's a fault file and it returns a fault, phosphor-hwmon does not update the sensor value on D-Bus. However, phosphor-host-ipmid's request will succeed (<b>return</b> <b>IPMI_CC_OK and  a stale sensor value</b>) since the device is left on D-Bus by default.</div><div><br></div><div>The new default behavior:</div><div><ul><li>We will always have an OperationalState interface with Functional property for each Sensor.Value</li><li>If a fault file with fault has been detected, Functional property will be set to false</li><ul><li>If UPDATE_FUNCTIONAL_ON_FAIL build switch is defined, Functional will be updated to false upon sensor read failures as well</li></ul><li>phosphor-host-ipmid will read this Functional property when performing a Sensor.Value read</li><ul><li>If the Functional property is false, phosphor-host-ipmid will return <b>IPMI_CC_SENSOR_INVALID and fail</b></li></ul></ul></div><div><br></div><div>The main difference is that phosphor-host-ipmid will be performing an extra property read to see if a sensor is `Functional` for Sensor.Value and  returning a failure IPMI code instead of a stale sensor value when sensor has a fault.</div><div><br></div><div>You can find 3 open code reviews under this topic <<a href="https://gerrit.openbmc-project.xyz/q/topic:%22Handle+Sensor.Value+read+failure%22+(status:open%20OR%20status:merged)">https://gerrit.openbmc-project.xyz/q/topic:%22Handle+Sensor.Value+read+failure%22+(status:open%20OR%20status:merged)</a>> </div><div><br></div><div>Thanks,</div><div>Brandon</div><div><br></div></div>