src/dpdk/drivers/net/txgbe/base/txgbe_phy.c
s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
				 u8 dev_addr, u8 data)
{
	u32 swfw_mask = hw->phy.phy_semaphore_mask;
	int err = 0;

	if (hw->mac.acquire_swfw_sync(hw, swfw_mask))
		return TXGBE_ERR_SWFW_SYNC;
	err = txgbe_write_i2c_byte_unlocked(hw, byte_offset, dev_addr, data);
	hw->mac.release_swfw_sync(hw, swfw_mask);

	return err;
}
/**
 *  txgbe_write_i2c_byte - Writes 8 bit word over I2C
 *  @hw: pointer to hardware structure
 *  @byte_offset: byte offset to write
 *  @dev_addr: address to write to
 *  @data: value to write
 *
 *  Performs byte write operation to SFP module's EEPROM over I2C interface at
 *  a specified device address.
 **/
Writes 8 bit word over I2C
@hw: pointer to hardware structure
@byte_offset: byte offset to write
@dev_addr: address to write to
@data: value to write

Performs byte write operation to SFP module's EEPROM over I2C interface at
a specified device address.
Writes 8 bit word over I2C @hw : pointer to hardware structure @byte_offset : byte offset to write @dev_addr : address to write to @data : value to write Performs byte write operation to SFP module ' s EEPROM over I2C interface at a specified device address .
s32 txgbe_write_i2c_byte(struct txgbe_hw *hw, u8 byte_offset,
				 u8 dev_addr, u8 data)
{
	u32 swfw_mask = hw->phy.phy_semaphore_mask;
	int err = 0;
	if (hw->mac.acquire_swfw_sync(hw, swfw_mask))
		return TXGBE_ERR_SWFW_SYNC;
	err = txgbe_write_i2c_byte_unlocked(hw, byte_offset, dev_addr, data);
	hw->mac.release_swfw_sync(hw, swfw_mask);
	return err;
}
s32 txgbe_write_i2c_byte ( struct txgbe_hw * hw , u8 byte_offset , u8 dev_addr , u8 data ) { u32 swfw_mask = hw -> phy . phy_semaphore_mask ; int err = 0 ; if ( hw -> mac . acquire_swfw_sync ( hw , swfw_mask ) ) return TXGBE_ERR_SWFW_SYNC ; err = txgbe_write_i2c_byte_unlocked ( hw , byte_offset , dev_addr , data ) ; hw -> mac . release_swfw_sync ( hw , swfw_mask ) ; return err ; }
txgbe_write_i2c_byte - Writes 8 bit word over I2C
  @hw: pointer to hardware structure
  @byte_offset: byte offset to write
  @dev_addr: address to write to
  @data: value to write
txgbe_write_i2c_byte - Writes 8 bit word over I2C @hw : pointer to hardware structure @byte_offset : byte offset to write @dev_addr : address to write to @data : value to write