src/dpdk/drivers/net/ixgbe/base/ixgbe_x550.c
s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset,
				    u16 data)
{
	s32 status;
	struct ixgbe_hic_write_shadow_ram buffer;

	DEBUGFUNC("ixgbe_write_ee_hostif_data_X550");

	buffer.hdr.req.cmd = FW_WRITE_SHADOW_RAM_CMD;
	buffer.hdr.req.buf_lenh = 0;
	buffer.hdr.req.buf_lenl = FW_WRITE_SHADOW_RAM_LEN;
	buffer.hdr.req.checksum = FW_DEFAULT_CHECKSUM;

	 /* one word */
	buffer.length = IXGBE_CPU_TO_BE16(sizeof(u16));
	buffer.data = data;
	buffer.address = IXGBE_CPU_TO_BE32(offset * 2);

	status = ixgbe_host_interface_command(hw, (u32 *)&buffer,
					      sizeof(buffer),
					      IXGBE_HI_COMMAND_TIMEOUT, true);
	if (status != IXGBE_SUCCESS) {
		DEBUGOUT2("for offset %04x failed with status %d\n",
			  offset, status);
		return status;
	}

	if (buffer.hdr.rsp.buf_lenh_status != FW_CEM_RESP_STATUS_SUCCESS) {
		DEBUGOUT2("for offset %04x host interface return status %02x\n",
			  offset, buffer.hdr.rsp.buf_lenh_status);
		return IXGBE_ERR_HOST_INTERFACE_COMMAND;
	}

	return status;
}
/**
 * ixgbe_write_ee_hostif_X550 - Write EEPROM word using hostif
 * @hw: pointer to hardware structure
 * @offset: offset of  word in the EEPROM to write
 * @data: word write to the EEPROM
 *
 * Write a 16 bit word to the EEPROM using the hostif.
 **/
Write EEPROM word using hostif
@hw: pointer to hardware structure
@offset: offset of  word in the EEPROM to write
@data: word write to the EEPROM

Write a 16 bit word to the EEPROM using the hostif.
Write EEPROM word using hostif @hw : pointer to hardware structure @offset : offset of word in the EEPROM to write @data : word write to the EEPROM Write a 16 bit word to the EEPROM using the hostif .
s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset,
				    u16 data)
{
	s32 status;
	struct ixgbe_hic_write_shadow_ram buffer;
	DEBUGFUNC("ixgbe_write_ee_hostif_data_X550");
	buffer.hdr.req.cmd = FW_WRITE_SHADOW_RAM_CMD;
	buffer.hdr.req.buf_lenh = 0;
	buffer.hdr.req.buf_lenl = FW_WRITE_SHADOW_RAM_LEN;
	buffer.hdr.req.checksum = FW_DEFAULT_CHECKSUM;
	buffer.length = IXGBE_CPU_TO_BE16(sizeof(u16));
	buffer.data = data;
	buffer.address = IXGBE_CPU_TO_BE32(offset * 2);
	status = ixgbe_host_interface_command(hw, (u32 *)&buffer,
					      sizeof(buffer),
					      IXGBE_HI_COMMAND_TIMEOUT, true);
	if (status != IXGBE_SUCCESS) {
		DEBUGOUT2("for offset %04x failed with status %d\n",
			  offset, status);
		return status;
	}
	if (buffer.hdr.rsp.buf_lenh_status != FW_CEM_RESP_STATUS_SUCCESS) {
		DEBUGOUT2("for offset %04x host interface return status %02x\n",
			  offset, buffer.hdr.rsp.buf_lenh_status);
		return IXGBE_ERR_HOST_INTERFACE_COMMAND;
	}
	return status;
}
s32 ixgbe_write_ee_hostif_data_X550 ( struct ixgbe_hw * hw , u16 offset , u16 data ) { s32 status ; struct ixgbe_hic_write_shadow_ram buffer ; DEBUGFUNC ( " " ) ; buffer . hdr . req . cmd = FW_WRITE_SHADOW_RAM_CMD ; buffer . hdr . req . buf_lenh = 0 ; buffer . hdr . req . buf_lenl = FW_WRITE_SHADOW_RAM_LEN ; buffer . hdr . req . checksum = FW_DEFAULT_CHECKSUM ; buffer . length = IXGBE_CPU_TO_BE16 ( sizeof ( u16 ) ) ; buffer . data = data ; buffer . address = IXGBE_CPU_TO_BE32 ( offset * 2 ) ; status = ixgbe_host_interface_command ( hw , ( u32 * ) & buffer , sizeof ( buffer ) , IXGBE_HI_COMMAND_TIMEOUT , true ) ; if ( status != IXGBE_SUCCESS ) { DEBUGOUT2 ( " \n " , offset , status ) ; return status ; } if ( buffer . hdr . rsp . buf_lenh_status != FW_CEM_RESP_STATUS_SUCCESS ) { DEBUGOUT2 ( " \n " , offset , buffer . hdr . rsp . buf_lenh_status ) ; return IXGBE_ERR_HOST_INTERFACE_COMMAND ; } return status ; }
ixgbe_write_ee_hostif_X550 - Write EEPROM word using hostif
 @hw: pointer to hardware structure
 @offset: offset of  word in the EEPROM to write
 @data: word write to the EEPROM
ixgbe_write_ee_hostif_X550 - Write EEPROM word using hostif @hw : pointer to hardware structure @offset : offset of word in the EEPROM to write @data : word write to the EEPROM
/* one word */