Lines Matching full: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; in igc_validate_nvm_checksum() local
173 checksum += nvm_data; in igc_validate_nvm_checksum()
176 if (checksum != (u16)NVM_SUM) { in igc_validate_nvm_checksum()
177 hw_dbg("NVM Checksum Invalid\n"); in igc_validate_nvm_checksum()
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; in igc_update_nvm_checksum() local
203 hw_dbg("NVM Read Error while updating checksum.\n"); in igc_update_nvm_checksum()
206 checksum += nvm_data; in igc_update_nvm_checksum()
208 checksum = (u16)NVM_SUM - checksum; in igc_update_nvm_checksum()
209 ret_val = hw->nvm.ops.write(hw, NVM_CHECKSUM_REG, 1, &checksum); in igc_update_nvm_checksum()
211 hw_dbg("NVM Write Error while updating checksum.\n"); in igc_update_nvm_checksum()