Dealing with a sensor which doesn't have valid reading until host is powered up

James Feist james.feist at linux.intel.com
Thu Sep 3 03:59:12 AEST 2020


On 8/31/2020 3:08 PM, Alex Qiu wrote:
> Hi James,
> 
> I just came through this doc 
> (https://www.boost.org/doc/libs/1_74_0/doc/html/boost_asio/overview/posix/stream_descriptor.html). 
> Looks like that it's a terrible idea for hwmon driver to return EAGAIN 
> for dbus-sensors. With that, I think the proper fix is also to use other 
> errno instead in our driver, and this caveat should be probably 
> documented somewhere.
> 

Hi Alex,

I hit something similar with peci where timeouts was causing the scan 
loop to hang. I remembered that back when we were developing ipmbbridge 
we hit something similar with i2c, and the work around was to use the 
tcp socket instead 
https://www.boost.org/doc/libs/1_74_0/doc/html/boost_asio/reference/ip__tcp/socket.html 
as it could correctly handle the errors. This worked for me for the 
CpuSensor and is a easy to implement change that might be worth trying 
for other sensors 
https://gerrit.openbmc-project.xyz/c/openbmc/dbus-sensors/+/36181.

Thanks

James


More information about the openbmc mailing list