src/dpdk/drivers/net/txgbe/base/txgbe_phy.c
s32 txgbe_read_phy_reg(struct txgbe_hw *hw, u32 reg_addr,
			       u32 device_type, u16 *phy_data)
{
	s32 err;
	u32 gssr = hw->phy.phy_semaphore_mask;

	DEBUGFUNC("txgbe_read_phy_reg");

	if (hw->mac.acquire_swfw_sync(hw, gssr))
		return TXGBE_ERR_SWFW_SYNC;

	err = hw->phy.read_reg_mdi(hw, reg_addr, device_type, phy_data);

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

	return err;
}
/**
 *  txgbe_read_phy_reg - Reads a value from a specified PHY register
 *  using the SWFW lock - this function is needed in most cases
 *  @hw: pointer to hardware structure
 *  @reg_addr: 32 bit address of PHY register to read
 *  @device_type: 5 bit device type
 *  @phy_data: Pointer to read data from PHY register
 **/
Reads a value from a specified PHY register
using the SWFW lock - this function is needed in most cases
@hw: pointer to hardware structure
@reg_addr: 32 bit address of PHY register to read
@device_type: 5 bit device type
@phy_data: Pointer to read data from PHY register
Reads a value from a specified PHY register using the SWFW lock - this function is needed in most cases @hw : pointer to hardware structure @reg_addr : 32 bit address of PHY register to read @device_type : 5 bit device type @phy_data : Pointer to read data from PHY register
s32 txgbe_read_phy_reg(struct txgbe_hw *hw, u32 reg_addr,
			       u32 device_type, u16 *phy_data)
{
	s32 err;
	u32 gssr = hw->phy.phy_semaphore_mask;
	DEBUGFUNC("txgbe_read_phy_reg");
	if (hw->mac.acquire_swfw_sync(hw, gssr))
		return TXGBE_ERR_SWFW_SYNC;
	err = hw->phy.read_reg_mdi(hw, reg_addr, device_type, phy_data);
	hw->mac.release_swfw_sync(hw, gssr);
	return err;
}
s32 txgbe_read_phy_reg ( struct txgbe_hw * hw , u32 reg_addr , u32 device_type , u16 * phy_data ) { s32 err ; u32 gssr = hw -> phy . phy_semaphore_mask ; DEBUGFUNC ( " " ) ; if ( hw -> mac . acquire_swfw_sync ( hw , gssr ) ) return TXGBE_ERR_SWFW_SYNC ; err = hw -> phy . read_reg_mdi ( hw , reg_addr , device_type , phy_data ) ; hw -> mac . release_swfw_sync ( hw , gssr ) ; return err ; }
txgbe_read_phy_reg - Reads a value from a specified PHY register
  using the SWFW lock - this function is needed in most cases
  @hw: pointer to hardware structure
  @reg_addr: 32 bit address of PHY register to read
  @device_type: 5 bit device type
  @phy_data: Pointer to read data from PHY register
txgbe_read_phy_reg - Reads a value from a specified PHY register using the SWFW lock - this function is needed in most cases @hw : pointer to hardware structure @reg_addr : 32 bit address of PHY register to read @device_type : 5 bit device type @phy_data : Pointer to read data from PHY register