<div dir="ltr">Hi James,<div><br></div><div>Thx for the reply! So right now, one thing is that the sensor is not dependent on the power state of the host solely, but also dependent on the boot progress of the host. And the more serious issue is that returning EAGAIN from the driver freezes the sensor, which is what I'm debugging right now. Do we have special treatment on errno returned by the driver? Thx.</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">- Alex Qiu</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 28, 2020 at 9:38 AM James Feist <<a href="mailto:james.feist@linux.intel.com">james.feist@linux.intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 8/27/2020 2:49 PM, Alex Qiu wrote:<br>
> Hi James,<br>
> <br>
> After some debugging, I realized that the code I pointed out earlier <br>
> wasn't the root cause. Update is that, the HwmonTempSensor stops <br>
> updating after the hwmon driver returns EAGAIN as errno. I'll keep <br>
> debugging...<br>
> <br>
> - Alex Qiu<br>
> <br>
> <br>
> On Tue, Aug 25, 2020 at 5:49 PM Alex Qiu <<a href="mailto:xqiu@google.com" target="_blank">xqiu@google.com</a> <br>
> <mailto:<a href="mailto:xqiu@google.com" target="_blank">xqiu@google.com</a>>> wrote:<br>
> <br>
>     Hi James and OpenBMC community,<br>
> <br>
>     We have a sensor for HwmonTempSensor which doesn't have a valid<br>
>     reading until the host is fully booted. Before it's becoming alive<br>
>     and useful, it's getting disabled in code<br>
>     (<a href="https://github.com/openbmc/dbus-sensors/blob/master/include/sensor.hpp#L266" rel="noreferrer" target="_blank">https://github.com/openbmc/dbus-sensors/blob/master/include/sensor.hpp#L266</a>)<br>
>     because of errors thrown up by the hwmon driver. Ideally, the<br>
>     thermal control loop should kick the fan to fail safe mode until no<br>
>     more errors are observed.<br>
> <br>
>     Any suggestions on how we should handle this kind of sensor properly?<br>
<br>
For what its worth we use the PowerState property that has options of <br>
power on or BiosPost to disable scanning when the state is invalid: <br>
<a href="https://github.com/openbmc/dbus-sensors/blob/f27a55c775383a3fb1ac655f3eda785f6845f214/src/HwmonTempMain.cpp#L208" rel="noreferrer" target="_blank">https://github.com/openbmc/dbus-sensors/blob/f27a55c775383a3fb1ac655f3eda785f6845f214/src/HwmonTempMain.cpp#L208</a><br>
<br>
<br>
> <br>
>     Thank you!<br>
> <br>
>     - Alex Qiu<br>
> <br>
</blockquote></div>