diff options
Diffstat (limited to 'src/usr/i2c')
-rwxr-xr-x | src/usr/i2c/tpmdd.C | 28 | ||||
-rwxr-xr-x | src/usr/i2c/tpmdd.H | 7 |
2 files changed, 22 insertions, 13 deletions
diff --git a/src/usr/i2c/tpmdd.C b/src/usr/i2c/tpmdd.C index d2b777cb0..8c0b5319a 100755 --- a/src/usr/i2c/tpmdd.C +++ b/src/usr/i2c/tpmdd.C @@ -340,7 +340,8 @@ bool tpmPresence ( TARGETING::Target * i_target, err = tpmRead( &vendorId, vendorIdSize, - tpmInfo ); + tpmInfo, + true /* silent */ ); if ( NULL != err ) { @@ -391,7 +392,8 @@ bool tpmPresence ( TARGETING::Target * i_target, err = tpmRead( &familyId, familyIdSize, - tpmInfo ); + tpmInfo, + true /* silent */); if ( NULL != err ) { @@ -463,7 +465,8 @@ bool tpmPresence ( TARGETING::Target * i_target, // ------------------------------------------------------------------ errlHndl_t tpmRead ( void * o_buffer, size_t i_buflen, - tpm_info_t i_tpmInfo ) + tpm_info_t i_tpmInfo, + bool i_silent) { errlHndl_t err = NULL; errlHndl_t err_NACK = NULL; @@ -654,16 +657,19 @@ errlHndl_t tpmRead ( void * o_buffer, { if (err) { - // commit original NACK error with new err PLID - err_NACK->plid(err->plid()); - TRACFCOMP(g_trac_tpmdd, "tpmRead(): Committing saved NACK " - "err eid=0x%X with plid of returned err: 0x%X", - err_NACK->eid(), err_NACK->plid()); + if (!i_silent) + { + // commit original NACK error with new err PLID + err_NACK->plid(err->plid()); + TRACFCOMP(g_trac_tpmdd, "tpmRead(): Committing saved NACK " + "err eid=0x%X with plid of returned err: 0x%X", + err_NACK->eid(), err_NACK->plid()); - ERRORLOG::ErrlUserDetailsTarget(i_tpmInfo.i2cTarget) - .addToLog(err_NACK); + ERRORLOG::ErrlUserDetailsTarget(i_tpmInfo.i2cTarget) + .addToLog(err_NACK); - errlCommit(err_NACK, TPMDD_COMP_ID); + errlCommit(err_NACK, TPMDD_COMP_ID); + } } else { diff --git a/src/usr/i2c/tpmdd.H b/src/usr/i2c/tpmdd.H index ad531d67d..1daee5ab6 100755 --- a/src/usr/i2c/tpmdd.H +++ b/src/usr/i2c/tpmdd.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -158,12 +158,15 @@ errlHndl_t tpmPerformOp( DeviceFW::OperationType i_opType, * @param[in] i_tpmInfo Structure of I2C parameters needed to execute * the command to the I2C device driver. * + * @param[in] i_silent Don't log any error logs on failure + * * @return errlHndl_t NULL if successful, otherwise a pointer to the * error log. */ errlHndl_t tpmRead ( void * o_buffer, size_t i_buflen, - tpm_info_t i_tpmInfo ); + tpm_info_t i_tpmInfo, + bool i_silent = false); /** * @brief This function peforms the sequencing to do a write of the |