src/dpdk/drivers/net/txgbe/base/txgbe_eeprom.c
s32 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset,
			       u16 data)
{
	const u32 mask = TXGBE_MNGSEM_SWMBX | TXGBE_MNGSEM_SWFLASH;
	u32 addr = (offset << 1);
	int err;

	DEBUGFUNC("\n");

	err = hw->mac.acquire_swfw_sync(hw, mask);
	if (err)
		return err;

	err = txgbe_hic_sr_write(hw, addr, (u8 *)&data, 2);

	hw->mac.release_swfw_sync(hw, mask);

	return err;
}
/**
 *  txgbe_ee_write - 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 txgbe_ee_write16(struct txgbe_hw *hw, u32 offset,
			       u16 data)
{
	const u32 mask = TXGBE_MNGSEM_SWMBX | TXGBE_MNGSEM_SWFLASH;
	u32 addr = (offset << 1);
	int err;
	DEBUGFUNC("\n");
	err = hw->mac.acquire_swfw_sync(hw, mask);
	if (err)
		return err;
	err = txgbe_hic_sr_write(hw, addr, (u8 *)&data, 2);
	hw->mac.release_swfw_sync(hw, mask);
	return err;
}
s32 txgbe_ee_write16 ( struct txgbe_hw * hw , u32 offset , u16 data ) { const u32 mask = TXGBE_MNGSEM_SWMBX | TXGBE_MNGSEM_SWFLASH ; u32 addr = ( offset << 1 ) ; int err ; DEBUGFUNC ( " \n " ) ; err = hw -> mac . acquire_swfw_sync ( hw , mask ) ; if ( err ) return err ; err = txgbe_hic_sr_write ( hw , addr , ( u8 * ) & data , 2 ) ; hw -> mac . release_swfw_sync ( hw , mask ) ; return err ; }
txgbe_ee_write - 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
txgbe_ee_write - 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