summaryrefslogtreecommitdiffstats
path: root/src/usr/ipmi
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2015-02-26 13:49:32 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-02-28 06:00:38 -0600
commitc1c0f838d21167482e292246435e7c07f8bfa3bd (patch)
treea03d8dee4421eed5ab0965d1736461139d6c3769 /src/usr/ipmi
parentbffe97031429bd5656930f7453c496ce2594e5e6 (diff)
downloadtalos-hostboot-c1c0f838d21167482e292246435e7c07f8bfa3bd.tar.gz
talos-hostboot-c1c0f838d21167482e292246435e7c07f8bfa3bd.zip
Enable error logs for CC_BADSENSOR
-Re-enable logging errors for sensor numbers which the BMC does not recognize. Change-Id: If284e203c9f618bc3b7ce2be7605919fb2f3b02c RTC:123045 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16029 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com> Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/ipmi')
-rw-r--r--src/usr/ipmi/ipmisensor.C27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/usr/ipmi/ipmisensor.C b/src/usr/ipmi/ipmisensor.C
index fe1ace972..e5b4e64fd 100644
--- a/src/usr/ipmi/ipmisensor.C
+++ b/src/usr/ipmi/ipmisensor.C
@@ -171,26 +171,23 @@ namespace SENSOR
}
}
- // $TODO RTC:123045 - Remove when SDR is finalized
- // for now we will not create an error for bad sensor
- // numbers
- if( i_rc != IPMI::CC_BADSENSOR )
- {
// shift the sensor number into to bytes 0-3 and then
// or in the HUID to bytes 4-7
- uint64_t userdata2 = getSensorNumber();
+ uint32_t sensor_number = getSensorNumber();
+ uint32_t huid = TARGETING::get_huid( iv_target );
- userdata2 = (userdata2 << 32) | TARGETING::get_huid(iv_target);
+ TRACFCOMP(g_trac_ipmi,"Sensor Number: 0x%X, HUID: 0x%X", sensor_number, huid );
l_err = new ERRORLOG::ErrlEntry(
ERRORLOG::ERRL_SEV_UNRECOVERABLE,
IPMI::MOD_IPMISENSOR,
l_reasonCode,
- i_rc, userdata2, true);
+ i_rc,
+ TWO_UINT32_TO_UINT64( sensor_number, huid ),
+ true);
l_err->collectTrace(IPMI_COMP_NAME);
- }
}
return l_err;
}
@@ -204,7 +201,7 @@ namespace SENSOR
errlHndl_t l_err = NULL;
- iv_msg->iv_sensor_number = getSensorNumber();
+ iv_msg->iv_sensor_number = static_cast<uint8_t>(getSensorNumber());
if( iv_msg->iv_sensor_number != TARGETING::UTIL::INVALID_IPMI_SENSOR )
{
@@ -287,7 +284,7 @@ namespace SENSOR
// deleted by the IPMI transport layer
uint8_t * l_data = new uint8_t[len];
- l_data[0] = getSensorNumber();
+ l_data[0] = static_cast<uint8_t>(getSensorNumber());
IPMI::completion_code cc = IPMI::CC_UNKBAD;
@@ -303,8 +300,7 @@ namespace SENSOR
{
l_err = processCompletionCode( cc );
- // $TODO RTC:123045 - Remove when SDR is finalized
- if( l_err == NULL && (cc != IPMI::CC_BADSENSOR) )
+ if( l_err == NULL )
{
// populate the output structure with the sensor data
o_data.completion_code = cc;
@@ -418,7 +414,7 @@ namespace SENSOR
if( l_err == NULL )
{
// check the completion code
- if( (cc!= IPMI::CC_OK) && (cc!=IPMI::CC_BADSENSOR) )
+ if( cc!= IPMI::CC_OK )
{
TRACFCOMP(g_trac_ipmi,"bad completion code from BMC=0x%x",cc);
@@ -442,15 +438,12 @@ namespace SENSOR
}
else
{
- if( cc!=IPMI::CC_BADSENSOR )
- {
// grab the type and reading code to pass back to the caller
o_sensorType = l_data[0];
// high order bit is reserved
o_eventReadingType = ( 0x7f & l_data[1]);
- }
}
delete[] l_data;
}
OpenPOWER on IntegriCloud