Lines Matching defs:checksum
155 * igc_validate_nvm_checksum - Validate EEPROM checksum
158 * Calculates the EEPROM checksum by reading/adding each word of the EEPROM
163 u16 checksum = 0;
173 checksum += nvm_data;
176 if (checksum != (u16)NVM_SUM) {
187 * igc_update_nvm_checksum - Update EEPROM checksum
190 * Updates the EEPROM checksum by reading/adding each word of the EEPROM
191 * up to the checksum. Then calculates the EEPROM checksum and writes the
196 u16 checksum = 0;
203 hw_dbg("NVM Read Error while updating checksum.\n");
206 checksum += nvm_data;
208 checksum = (u16)NVM_SUM - checksum;
209 ret_val = hw->nvm.ops.write(hw, NVM_CHECKSUM_REG, 1, &checksum);
211 hw_dbg("NVM Write Error while updating checksum.\n");