diff options
| author | Donald Washburn <dwashbur@us.ibm.com> | 2017-06-14 13:08:22 -0500 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-06-27 13:21:34 -0400 |
| commit | 31d097409bd233008676e4779c9e6a7582e8156f (patch) | |
| tree | ca1c9afa82e0a5aa987b545f160cdbeb37cc4517 /src/usr/errl | |
| parent | d408402dfb499755ed265496498fabb5b0400ff0 (diff) | |
| download | talos-hostboot-31d097409bd233008676e4779c9e6a7582e8156f.tar.gz talos-hostboot-31d097409bd233008676e4779c9e6a7582e8156f.zip | |
Replaced calls to bmc for sensor type with static information.
The sendErrLogToBMC function was calling to the bmc in order
to determine the type of a sensor based upon a sensor number.
It was determined that the sensor type can be obtained from the
sensor number by data loaded during initialization via the
TARGETING namespace. The ipmi call from SenorBase::getSensorType
was removed from the sendErrLogToBMC function and replaced with
a call to IpmiConfigLookup::getSensorType. The getSensorType
function from the new IpmiConfigLookup class retrieves sensor
data from target attributes and as such does not call the bmc
for the type information.
* Added the new IpmiConfigLookup class in the IPMI namespace.
This class provides static methods to retrive sensor data
provided by the IPMI_SENSOR target attribute. In addition to
sensor type, the sensor entity id and sensor name can be
obtined from this class based upon a sensor number.
* Changed sendErrLogToBMC to call IpmiConfigLookup::getSensorType
instead of Sensor::SensorBase::getSensorInfo.
RTC: 164493
Change-Id: Ie8e7fa5c37fa972d6cecd1e4b69e2d0cb7504533
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42128
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Reviewed-by: Richard J. Knight <rjknight@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/errl')
| -rw-r--r-- | src/usr/errl/errlmanager_common.C | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/usr/errl/errlmanager_common.C b/src/usr/errl/errlmanager_common.C index 385042748..a0a54da5e 100644 --- a/src/usr/errl/errlmanager_common.C +++ b/src/usr/errl/errlmanager_common.C @@ -29,6 +29,7 @@ #ifdef CONFIG_BMC_IPMI #include <ipmi/ipmisel.H> #include <ipmi/ipmisensor.H> +#include <ipmi/ipmiconfiglookup.H> #endif #include <errl/errlentry.H> #include <sys/mm.h> @@ -711,21 +712,18 @@ void ErrlManager::sendErrLogToBmc(errlHndl_t &io_err, bool i_sendSels) // grab the sensor type so the bmc knows how to use the // offset - uint8_t unused = 0; - errlHndl_t e = - SENSOR::SensorBase::getSensorType( - l_sensorNumber[j], - l_sensorType[j],unused); - - if( e ) + errlHndl_t l_errl = + IPMI::IpmiConfigLookup::getSensorType(l_sensorNumber[j], + l_sensorType[j] + ); + if(l_errl) { TRACFCOMP(g_trac_errl, ERR_MRK"Failed to get sensor type for sensor %d", l_sensorNumber[j]); l_sensorType[j] = 0; - // since we are in the commit path, lets just delete - // this error and move on. - delete e; + + delete l_errl; } // this call will modify the sensor if any procedure |

