src/dpdk/drivers/net/ixgbe/base/ixgbe_x550.c
s32 ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr,
				 u32 device_type, u32 *data)
{
	union {
		struct ixgbe_hic_internal_phy_req cmd;
		struct ixgbe_hic_internal_phy_resp rsp;
	} hic;
	s32 status;
	UNREFERENCED_1PARAMETER(device_type);

	memset(&hic, 0, sizeof(hic));
	hic.cmd.hdr.cmd = FW_INT_PHY_REQ_CMD;
	hic.cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN;
	hic.cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;
	hic.cmd.port_number = hw->bus.lan_id;
	hic.cmd.command_type = FW_INT_PHY_REQ_READ;
	hic.cmd.address = IXGBE_CPU_TO_BE16(reg_addr);

	status = ixgbe_host_interface_command(hw, (u32 *)&hic.cmd,
					      sizeof(hic.cmd),
					      IXGBE_HI_COMMAND_TIMEOUT, true);

	/* Extract the register value from the response. */
	*data = IXGBE_BE32_TO_CPU(hic.rsp.read_data);

	return status;
}
/**
 * ixgbe_read_iosf_sb_reg_x550a - Reads specified register of the IOSF device
 * @hw: pointer to hardware structure
 * @reg_addr: 32 bit PHY register to write
 * @device_type: 3 bit device type
 * @data: Pointer to read data from the register
 **/
Reads specified register of the IOSF device
@hw: pointer to hardware structure
@reg_addr: 32 bit PHY register to write
@device_type: 3 bit device type
@data: Pointer to read data from the register
Reads specified register of the IOSF device @hw : pointer to hardware structure @reg_addr : 32 bit PHY register to write @device_type : 3 bit device type @data : Pointer to read data from the register
s32 ixgbe_read_iosf_sb_reg_x550a(struct ixgbe_hw *hw, u32 reg_addr,
				 u32 device_type, u32 *data)
{
	union {
		struct ixgbe_hic_internal_phy_req cmd;
		struct ixgbe_hic_internal_phy_resp rsp;
	} hic;
	s32 status;
	UNREFERENCED_1PARAMETER(device_type);
	memset(&hic, 0, sizeof(hic));
	hic.cmd.hdr.cmd = FW_INT_PHY_REQ_CMD;
	hic.cmd.hdr.buf_len = FW_INT_PHY_REQ_LEN;
	hic.cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;
	hic.cmd.port_number = hw->bus.lan_id;
	hic.cmd.command_type = FW_INT_PHY_REQ_READ;
	hic.cmd.address = IXGBE_CPU_TO_BE16(reg_addr);
	status = ixgbe_host_interface_command(hw, (u32 *)&hic.cmd,
					      sizeof(hic.cmd),
					      IXGBE_HI_COMMAND_TIMEOUT, true);
	*data = IXGBE_BE32_TO_CPU(hic.rsp.read_data);
	return status;
}
s32 ixgbe_read_iosf_sb_reg_x550a ( struct ixgbe_hw * hw , u32 reg_addr , u32 device_type , u32 * data ) { union { struct ixgbe_hic_internal_phy_req cmd ; struct ixgbe_hic_internal_phy_resp rsp ; } hic ; s32 status ; UNREFERENCED_1PARAMETER ( device_type ) ; memset ( & hic , 0 , sizeof ( hic ) ) ; hic . cmd . hdr . cmd = FW_INT_PHY_REQ_CMD ; hic . cmd . hdr . buf_len = FW_INT_PHY_REQ_LEN ; hic . cmd . hdr . checksum = FW_DEFAULT_CHECKSUM ; hic . cmd . port_number = hw -> bus . lan_id ; hic . cmd . command_type = FW_INT_PHY_REQ_READ ; hic . cmd . address = IXGBE_CPU_TO_BE16 ( reg_addr ) ; status = ixgbe_host_interface_command ( hw , ( u32 * ) & hic . cmd , sizeof ( hic . cmd ) , IXGBE_HI_COMMAND_TIMEOUT , true ) ; * data = IXGBE_BE32_TO_CPU ( hic . rsp . read_data ) ; return status ; }
ixgbe_read_iosf_sb_reg_x550a - Reads specified register of the IOSF device
 @hw: pointer to hardware structure
 @reg_addr: 32 bit PHY register to write
 @device_type: 3 bit device type
 @data: Pointer to read data from the register
ixgbe_read_iosf_sb_reg_x550a - Reads specified register of the IOSF device @hw : pointer to hardware structure @reg_addr : 32 bit PHY register to write @device_type : 3 bit device type @data : Pointer to read data from the register
/* Extract the register value from the response. */