src/dpdk/drivers/net/ixgbe/base/ixgbe_x550.c
s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw)
{
	s32 status;
	u16 checksum = 0;

	DEBUGFUNC("ixgbe_update_eeprom_checksum_X550");

	/* Read the first word from the EEPROM. If this times out or fails, do
	 * not continue or we could be in for a very long wait while every
	 * EEPROM read fails
	 */
	status = ixgbe_read_ee_hostif_X550(hw, 0, &checksum);
	if (status) {
		DEBUGOUT("EEPROM read failed\n");
		return status;
	}

	status = ixgbe_calc_eeprom_checksum_X550(hw);
	if (status < 0)
		return status;

	checksum = (u16)(status & 0xffff);

	status = ixgbe_write_ee_hostif_X550(hw, IXGBE_EEPROM_CHECKSUM,
					    checksum);
	if (status)
		return status;

	status = ixgbe_update_flash_X550(hw);

	return status;
}
/**
 * ixgbe_update_eeprom_checksum_X550 - Updates the EEPROM checksum and flash
 * @hw: pointer to hardware structure
 *
 * After writing EEPROM to shadow RAM using EEWR register, software calculates
 * checksum and updates the EEPROM and instructs the hardware to update
 * the flash.
 **/
Updates the EEPROM checksum and flash
@hw: pointer to hardware structure

After writing EEPROM to shadow RAM using EEWR register, software calculates
checksum and updates the EEPROM and instructs the hardware to update
the flash.
Updates the EEPROM checksum and flash @hw : pointer to hardware structure After writing EEPROM to shadow RAM using EEWR register software calculates checksum and updates the EEPROM and instructs the hardware to update the flash .
s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw)
{
	s32 status;
	u16 checksum = 0;
	DEBUGFUNC("ixgbe_update_eeprom_checksum_X550");
	status = ixgbe_read_ee_hostif_X550(hw, 0, &checksum);
	if (status) {
		DEBUGOUT("EEPROM read failed\n");
		return status;
	}
	status = ixgbe_calc_eeprom_checksum_X550(hw);
	if (status < 0)
		return status;
	checksum = (u16)(status & 0xffff);
	status = ixgbe_write_ee_hostif_X550(hw, IXGBE_EEPROM_CHECKSUM,
					    checksum);
	if (status)
		return status;
	status = ixgbe_update_flash_X550(hw);
	return status;
}
s32 ixgbe_update_eeprom_checksum_X550 ( struct ixgbe_hw * hw ) { s32 status ; u16 checksum = 0 ; DEBUGFUNC ( " " ) ; status = ixgbe_read_ee_hostif_X550 ( hw , 0 , & checksum ) ; if ( status ) { DEBUGOUT ( " \n " ) ; return status ; } status = ixgbe_calc_eeprom_checksum_X550 ( hw ) ; if ( status < 0 ) return status ; checksum = ( u16 ) ( status & 0xffff ) ; status = ixgbe_write_ee_hostif_X550 ( hw , IXGBE_EEPROM_CHECKSUM , checksum ) ; if ( status ) return status ; status = ixgbe_update_flash_X550 ( hw ) ; return status ; }
ixgbe_update_eeprom_checksum_X550 - Updates the EEPROM checksum and flash
 @hw: pointer to hardware structure
ixgbe_update_eeprom_checksum_X550 - Updates the EEPROM checksum and flash @hw : pointer to hardware structure
/* Read the first word from the EEPROM. If this times out or fails, do
	 * not continue or we could be in for a very long wait while every
	 * EEPROM read fails
	 */