diff options
| author | Richard J. Knight <rjknight@us.ibm.com> | 2015-02-27 19:45:56 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-03-01 15:45:41 -0600 |
| commit | ecc3b60a9eab364053194072fd0ba57536d1a3a7 (patch) | |
| tree | 42b79e81edc00cdf2ae150868e838957298e5646 /src/usr/ipmi | |
| parent | c0909f918dd56a0a28ec70581a0a79eb98a788da (diff) | |
| download | blackbird-hostboot-ecc3b60a9eab364053194072fd0ba57536d1a3a7.tar.gz blackbird-hostboot-ecc3b60a9eab364053194072fd0ba57536d1a3a7.zip | |
Assert called when trying to deconfigure a DIMM
-Remove assert call from default path. Assert
should not be called for targets without status
sensors. Path should be a no-op.
Change-Id: Id1aa002ea3d79cf24b5c123cbd92647257d12093
RTC:124846
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16058
Reviewed-by: WILLIAM G. HOFFA <wghoffa@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.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.C | 96 |
1 files changed, 51 insertions, 45 deletions
diff --git a/src/usr/ipmi/ipmisensor.C b/src/usr/ipmi/ipmisensor.C index 00bb211cb..4b5b47858 100644 --- a/src/usr/ipmi/ipmisensor.C +++ b/src/usr/ipmi/ipmisensor.C @@ -39,6 +39,7 @@ extern trace_desc_t * g_trac_ipmi; namespace SENSOR { + // // Base class for sensor construction. It is expected that this object will // be used as the base for any additional sensors defined. @@ -640,8 +641,10 @@ namespace SENSOR break; default: - assert(0, "No status sensor associated with target type 0x%x", + TRACFCOMP(g_trac_ipmi,"INF>>No status sensor associated with target type 0x%x", i_target->getAttr<TARGETING::ATTR_TYPE>()); + iv_functionalOffset = INVALID_OFFSET; + iv_presentOffset = INVALID_OFFSET; break; } @@ -662,56 +665,59 @@ namespace SENSOR errlHndl_t l_err = NULL; - uint16_t func_mask = setMask( iv_functionalOffset ); - uint16_t pres_mask = setMask( iv_presentOffset ); - - switch ( i_state ) + if( iv_functionalOffset != INVALID_OFFSET + && iv_presentOffset != INVALID_OFFSET ) { - case NOT_PRESENT: - // turn off the present bit - iv_msg->iv_deassertion_mask = pres_mask; - // turn on the disabled bit - iv_msg->iv_assertion_mask = func_mask; - break; + uint16_t func_mask = setMask( iv_functionalOffset ); + uint16_t pres_mask = setMask( iv_presentOffset ); - case PRESENT: - // turn on the present bit - iv_msg->iv_assertion_mask = pres_mask; - break; + switch ( i_state ) + { + case NOT_PRESENT: + // turn off the present bit + iv_msg->iv_deassertion_mask = pres_mask; + // turn on the disabled bit + iv_msg->iv_assertion_mask = func_mask; + break; - case FUNCTIONAL: - // turn off the disabled bit - iv_msg->iv_deassertion_mask = func_mask; - break; + case PRESENT: + // turn on the present bit + iv_msg->iv_assertion_mask = pres_mask; + break; - case PRESENT_FUNCTIONAL: - // assert the present bit - iv_msg->iv_assertion_mask = pres_mask; - // turn off the disabled bit - iv_msg->iv_deassertion_mask = func_mask; - break; + case FUNCTIONAL: + // turn off the disabled bit + iv_msg->iv_deassertion_mask = func_mask; + break; - case PRESENT_NONFUNCTIONAL: - // assert the present bit - iv_msg->iv_assertion_mask = pres_mask; - // assert the disabled bit - iv_msg->iv_assertion_mask |= func_mask; - break; + case PRESENT_FUNCTIONAL: + // assert the present bit + iv_msg->iv_assertion_mask = pres_mask; + // turn off the disabled bit + iv_msg->iv_deassertion_mask = func_mask; + break; - case NON_FUNCTIONAL: - // assert the disabled bit - iv_msg->iv_assertion_mask = func_mask; - break; + case PRESENT_NONFUNCTIONAL: + // assert the present bit + iv_msg->iv_assertion_mask = pres_mask; + // assert the disabled bit + iv_msg->iv_assertion_mask |= func_mask; + break; - default: - // mark as not present - iv_msg->iv_deassertion_mask = pres_mask; - iv_msg->iv_assertion_mask = func_mask; - break; - } + case NON_FUNCTIONAL: + // assert the disabled bit + iv_msg->iv_assertion_mask = func_mask; + break; - l_err = writeSensorData(); + default: + // mark as not present + iv_msg->iv_deassertion_mask = pres_mask; + iv_msg->iv_assertion_mask = func_mask; + break; + } + l_err = writeSensorData(); + } return l_err; }; @@ -876,9 +882,9 @@ namespace SENSOR // // Used to update the sensor status for a specific set of target types - // currently supported types are TYPE_DIMM, TYPE_CORE, TYPE_PROC. These - // are virtual sensors where Hostboot updates the present and functional - // states and the BMC maintains the sensor. + // currently supported types are TYPE_DIMM, TYPE_MEMBUF, TYPE_CORE, + // TYPE_PROC. These are virtual sensors where Hostboot updates the + // present and functional states and the BMC maintains the sensor. // void updateBMCSensorStatus(TARGETING::TYPE i_type) { |

