diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2015-06-18 10:35:57 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-07-17 09:14:12 -0500 |
commit | 06ffb0d8868e0bd3143447d913932d72614f6c62 (patch) | |
tree | 17241f2333e1c2b71da0cc8e37437d61e0491399 /src/usr/i2c/eepromdd.C | |
parent | 4f9645ad560101c0bbe2abeb034e29e192ed90f2 (diff) | |
download | blackbird-hostboot-06ffb0d8868e0bd3143447d913932d72614f6c62.tar.gz blackbird-hostboot-06ffb0d8868e0bd3143447d913932d72614f6c62.zip |
Generate error when I2C writePageSize is zero
Change-Id: Iabfcc2ae99af78c392b5e2edaeec26150fe27a05
RTC:123567
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/18604
Tested-by: Jenkins Server
Tested-by: Jenkins OP Build CI
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/i2c/eepromdd.C')
-rwxr-xr-x | src/usr/i2c/eepromdd.C | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/usr/i2c/eepromdd.C b/src/usr/i2c/eepromdd.C index 828329d20..a6178a61d 100755 --- a/src/usr/i2c/eepromdd.C +++ b/src/usr/i2c/eepromdd.C @@ -631,6 +631,32 @@ errlHndl_t eepromWrite ( TARGETING::Target * i_target, break; } + // Check for writePageSize of zero + if ( i_i2cInfo.writePageSize == 0 ) + { + TRACFCOMP( g_trac_eeprom, + ERR_MRK"eepromWrite(): writePageSize is 0!"); + + /*@ + * @errortype + * @reasoncode EEPROM_I2C_WRITE_PAGE_SIZE_ZERO + * @severity ERRL_SEV_UNRECOVERABLE + * @moduleid EEPROM_WRITE + * @userdata1 HUID of target + * @userdata2 Chip to Access + * @devdesc I2C write page size is zero. + */ + err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE, + EEPROM_WRITE, + EEPROM_I2C_WRITE_PAGE_SIZE_ZERO, + TARGETING::get_huid(i_target), + i_i2cInfo.chip, + true /*Add HB SW Callout*/ ); + + err->collectTrace( EEPROM_COMP_NAME ); + + break; + } // EEPROM devices have write page boundaries, so when necessary // need to split up command into multiple write operations |