Skip to content

Commit

Permalink
sensordatahandler: enable scanning on assertion sensors
Browse files Browse the repository at this point in the history
Currently, only readingData type sensors will call enableScanning to
indicate (in the IPMI response) that the sensor is enabled. From the
IPMI spec v2:

  System software must ignore any sensor that has the sensor scanning
  bit disabled - if system software didn’t disable the sensor.

- and ipmitool will report that the sensor is disabled if the response
does not have this bit set.

This means that only the readingData type sensors work at the moment.

This change calls enableScanning() for the assertion, readingAssertion,
and eventdata2 sensor types too.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Change-Id: Ifafdbf03bdf7690b9e263ab480ac79d27ed9b1a4
  • Loading branch information
jk-ozlabs authored and tomjoseph83 committed May 27, 2020
1 parent 4d623e9 commit 3dc3558
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sensordatahandler.cpp
Expand Up @@ -133,6 +133,8 @@ GetSensorResponse mapDbusToAssertion(const Info& sensorInfo,
sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
GetSensorResponse response{};

enableScanning(&response);

auto service = ipmi::getService(bus, interface, path);

const auto& interfaceList = sensorInfo.propertyInterfaces;
Expand Down Expand Up @@ -169,6 +171,8 @@ GetSensorResponse eventdata2(const Info& sensorInfo)
sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
GetSensorResponse response{};

enableScanning(&response);

auto service = ipmi::getService(bus, sensorInfo.sensorInterface,
sensorInfo.sensorPath);

Expand Down
2 changes: 2 additions & 0 deletions sensordatahandler.hpp
Expand Up @@ -157,6 +157,8 @@ GetSensorResponse readingAssertion(const Info& sensorInfo)
sdbusplus::bus::bus bus{ipmid_get_sd_bus_connection()};
GetSensorResponse response{};

enableScanning(&response);

auto service = ipmi::getService(bus, sensorInfo.sensorInterface,
sensorInfo.sensorPath);

Expand Down

0 comments on commit 3dc3558

Please sign in to comment.