diff options
| author | Matt Derksen <mderkse1@us.ibm.com> | 2018-01-11 09:28:55 -0600 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-01-16 11:34:14 -0500 |
| commit | 722bf1861db9ae16c61291f2fb47deb7ddfe74aa (patch) | |
| tree | 2fc03bb099bcf619bc8cd9b405a6e6ee1a75a846 /src/usr/ipmi | |
| parent | dfb142acec4374e23a3de5fd45b232b8acd6403b (diff) | |
| download | talos-hostboot-722bf1861db9ae16c61291f2fb47deb7ddfe74aa.tar.gz talos-hostboot-722bf1861db9ae16c61291f2fb47deb7ddfe74aa.zip | |
Fix setting hbVolatile and RebootControl sensors
Setting sensor to 2 equates to BMC setting of 1,
Setting sensor to 1 equates to BMC setting of 0.
Change-Id: Ib3c4b4a144a8fad5bd4f93be88bbe0ff7476ab64
RTC: 180772
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51787
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Adriana Kobylak <anoo@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/ipmi')
| -rw-r--r-- | src/usr/ipmi/ipmisensor.C | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/usr/ipmi/ipmisensor.C b/src/usr/ipmi/ipmisensor.C index fadb65e05..173f6e546 100644 --- a/src/usr/ipmi/ipmisensor.C +++ b/src/usr/ipmi/ipmisensor.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* Contributors Listed Below - COPYRIGHT 2014,2018 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -673,8 +673,9 @@ namespace SENSOR if( l_err == NULL ) { - // this value is already byteswapped - if (l_data.event_status <= ENABLE_REBOOTS) + // Check that this value is a valid enum value + if ( l_data.event_status == ENABLE_REBOOTS || + l_data.event_status == DISABLE_REBOOTS ) { o_setting = static_cast<autoRebootSetting>(l_data.event_status); } @@ -1697,7 +1698,7 @@ namespace SENSOR // // setHbVolatile - tell BMC to make hostboot volatile memory - // (volatile(1) or not(0)) + // (volatile(2) or not(1)) // errlHndl_t HbVolatileSensor::setHbVolatile( hbVolatileSetting i_setting ) { @@ -1728,7 +1729,8 @@ namespace SENSOR if( l_err == nullptr ) { // check if in valid range of hbVolatileSetting enums - if (l_data.event_status <= ENABLE_VOLATILE) + if ( l_data.event_status == ENABLE_VOLATILE || + l_data.event_status == DISABLE_VOLATILE ) { o_setting = static_cast<hbVolatileSetting>(l_data.event_status); } |

