src/dpdk/drivers/net/txgbe/base/txgbe_eeprom.c
s32 txgbe_update_eeprom_checksum(struct txgbe_hw *hw)
{
	s32 status;
	u16 checksum;

	DEBUGFUNC("txgbe_update_eeprom_checksum");

	/* 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 = hw->rom.read16(hw, 0, &checksum);
	if (status) {
		DEBUGOUT("EEPROM read failed\n");
		return status;
	}

	status = hw->rom.calc_checksum(hw);
	if (status < 0)
		return status;

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

	status = hw->rom.writew_sw(hw, TXGBE_EEPROM_CHECKSUM, checksum);

	return status;
}
/**
 *  txgbe_update_eeprom_checksum - Updates the EEPROM checksum
 *  @hw: pointer to hardware structure
 **/
Updates the EEPROM checksum
@hw: pointer to hardware structure
Updates the EEPROM checksum @hw : pointer to hardware structure
s32 txgbe_update_eeprom_checksum(struct txgbe_hw *hw)
{
	s32 status;
	u16 checksum;
	DEBUGFUNC("txgbe_update_eeprom_checksum");
	status = hw->rom.read16(hw, 0, &checksum);
	if (status) {
		DEBUGOUT("EEPROM read failed\n");
		return status;
	}
	status = hw->rom.calc_checksum(hw);
	if (status < 0)
		return status;
	checksum = (u16)(status & 0xffff);
	status = hw->rom.writew_sw(hw, TXGBE_EEPROM_CHECKSUM, checksum);
	return status;
}
s32 txgbe_update_eeprom_checksum ( struct txgbe_hw * hw ) { s32 status ; u16 checksum ; DEBUGFUNC ( " " ) ; status = hw -> rom . read16 ( hw , 0 , & checksum ) ; if ( status ) { DEBUGOUT ( " \n " ) ; return status ; } status = hw -> rom . calc_checksum ( hw ) ; if ( status < 0 ) return status ; checksum = ( u16 ) ( status & 0xffff ) ; status = hw -> rom . writew_sw ( hw , TXGBE_EEPROM_CHECKSUM , checksum ) ; return status ; }
txgbe_update_eeprom_checksum - Updates the EEPROM checksum
  @hw: pointer to hardware structure
txgbe_update_eeprom_checksum - Updates the EEPROM checksum @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
	 */