 if ((hw->mac_type == e1000_82573) && (e1000_is_onboard_nvm_eeprom(hw) == FALSE)) { /* Check bit 4 of word 10h.  If it is 0, firmware is done updating * 10h-12h.  Checksum may need to be fixed. */ e1000_read_eeprom(hw, 0x10, 1, &eeprom_data); if ((eeprom_data & 0x10) == 0) { /* Read 0x23 and check bit 15.  This bit is a 1 when the checksum * has already been fixed.  If the checksum is still wrong and this * bit is a 1, we need to return bad checksum.  Otherwise, we need * to set this bit to a 1 and update the checksum. */ e1000_read_eeprom(hw, 0x23, 1, &eeprom_data); if ((eeprom_data & 0x8000) == 0) { eeprom_data |= 0x8000; e1000_write_eeprom(hw, 0x23, 1, &eeprom_data); e1000_update_eeprom_checksum(hw); } } } 
e1000_validate_eeprom_checksum(struct e1000_hw *hw){    uint16_t checksum = 0;    uint16_t i, eeprom_data;    DEBUGFUNC("e1000_validate_eeprom_checksum");    for(i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) {        if(e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) {            DEBUGOUT("EEPROM Read Error\n");            return -E1000_ERR_EEPROM;        }        checksum += eeprom_data;    }    if(checksum == (uint16_t) EEPROM_SUM)        return E1000_SUCCESS;    else {        DEBUGOUT("EEPROM Checksum Invalid\n");        return -E1000_ERR_EEPROM;    }}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2d7edb923a823660b081bd4c660300ee19adca8d/e1000_hw.c/buggy/drivers/net/e1000/e1000_hw.c