Lines Matching defs:checksum
474 * ixgbe_calc_eeprom_checksum_X540 - Calculates and returns the checksum
481 * Returns a negative error code on error, or the 16-bit checksum
486 u16 checksum = 0;
500 /* Include 0x0-0x3F in the checksum */
507 checksum += word;
542 checksum += word;
546 checksum = (u16)IXGBE_EEPROM_SUM - checksum;
548 return (s32)checksum;
552 * ixgbe_validate_eeprom_checksum_X540 - Validate EEPROM checksum
554 * @checksum_val: calculated checksum
556 * Performs checksum calculation and validates the EEPROM checksum. If the
563 u16 checksum;
572 status = hw->eeprom.ops.read(hw, 0, &checksum);
585 checksum = (u16)(status & 0xffff);
595 /* Verify read checksum from EEPROM is the same as
596 * calculated checksum
598 if (read_checksum != checksum) {
600 "Invalid EEPROM checksum");
604 /* If the user cares, return the calculated checksum */
606 *checksum_val = checksum;
615 * ixgbe_update_eeprom_checksum_X540 - Updates the EEPROM checksum and flash
619 * checksum and updates the EEPROM and instructs the hardware to update
625 u16 checksum;
633 status = hw->eeprom.ops.read(hw, 0, &checksum);
646 checksum = (u16)(status & 0xffff);
651 status = ixgbe_write_eewr_generic(hw, IXGBE_EEPROM_CHECKSUM, checksum);