diff options
-rw-r--r-- | src/include/usr/i2c/eepromddreasoncodes.H | 3 | ||||
-rwxr-xr-x | src/usr/i2c/eepromdd.C | 26 |
2 files changed, 28 insertions, 1 deletions
diff --git a/src/include/usr/i2c/eepromddreasoncodes.H b/src/include/usr/i2c/eepromddreasoncodes.H index 2137f807d..454d10851 100644 --- a/src/include/usr/i2c/eepromddreasoncodes.H +++ b/src/include/usr/i2c/eepromddreasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -73,6 +73,7 @@ enum eepromReasonCode EEPROM_TARGET_NULL = EEPROM_COMP_ID | 0x06, EEPROM_INVALID_ADDR_OFFSET_SIZE = EEPROM_COMP_ID | 0x07, EEPROM_OVERFLOW_ERROR = EEPROM_COMP_ID | 0x08, + EEPROM_I2C_WRITE_PAGE_SIZE_ZERO = EEPROM_COMP_ID | 0x09, }; enum UserDetailsTypes 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 |