src/dpdk/drivers/net/ixgbe/base/ixgbe_x550.c
s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw)
{
	u32 status;
	u16 reg;

	status = hw->phy.ops.read_reg(hw,
				      IXGBE_MDIO_TX_VENDOR_ALARMS_3,
				      IXGBE_MDIO_PMA_PMD_DEV_TYPE,
				      &reg);

	if (status != IXGBE_SUCCESS)
		return status;

	/* If PHY FW reset completed bit is set then this is the first
	 * SW instance after a power on so the PHY FW must be un-stalled.
	 */
	if (reg & IXGBE_MDIO_TX_VENDOR_ALARMS_3_RST_MASK) {
		status = hw->phy.ops.read_reg(hw,
					IXGBE_MDIO_GLOBAL_RES_PR_10,
					IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
					&reg);

		if (status != IXGBE_SUCCESS)
			return status;

		reg &= ~IXGBE_MDIO_POWER_UP_STALL;

		status = hw->phy.ops.write_reg(hw,
					IXGBE_MDIO_GLOBAL_RES_PR_10,
					IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
					reg);

		if (status != IXGBE_SUCCESS)
			return status;
	}

	return status;
}
/**
 * ixgbe_init_ext_t_x550em - Start (unstall) the external Base T PHY.
 * @hw: pointer to hardware structure
 */
Start (unstall) the external Base T PHY.
@hw: pointer to hardware structure
Start ( unstall ) the external Base T PHY . @hw : pointer to hardware structure
s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw)
{
	u32 status;
	u16 reg;
	status = hw->phy.ops.read_reg(hw,
				      IXGBE_MDIO_TX_VENDOR_ALARMS_3,
				      IXGBE_MDIO_PMA_PMD_DEV_TYPE,
				      &reg);
	if (status != IXGBE_SUCCESS)
		return status;
	if (reg & IXGBE_MDIO_TX_VENDOR_ALARMS_3_RST_MASK) {
		status = hw->phy.ops.read_reg(hw,
					IXGBE_MDIO_GLOBAL_RES_PR_10,
					IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
					&reg);
		if (status != IXGBE_SUCCESS)
			return status;
		reg &= ~IXGBE_MDIO_POWER_UP_STALL;
		status = hw->phy.ops.write_reg(hw,
					IXGBE_MDIO_GLOBAL_RES_PR_10,
					IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE,
					reg);
		if (status != IXGBE_SUCCESS)
			return status;
	}
	return status;
}
s32 ixgbe_init_ext_t_x550em ( struct ixgbe_hw * hw ) { u32 status ; u16 reg ; status = hw -> phy . ops . read_reg ( hw , IXGBE_MDIO_TX_VENDOR_ALARMS_3 , IXGBE_MDIO_PMA_PMD_DEV_TYPE , & reg ) ; if ( status != IXGBE_SUCCESS ) return status ; if ( reg & IXGBE_MDIO_TX_VENDOR_ALARMS_3_RST_MASK ) { status = hw -> phy . ops . read_reg ( hw , IXGBE_MDIO_GLOBAL_RES_PR_10 , IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE , & reg ) ; if ( status != IXGBE_SUCCESS ) return status ; reg &= ~ IXGBE_MDIO_POWER_UP_STALL ; status = hw -> phy . ops . write_reg ( hw , IXGBE_MDIO_GLOBAL_RES_PR_10 , IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE , reg ) ; if ( status != IXGBE_SUCCESS ) return status ; } return status ; }
ixgbe_init_ext_t_x550em - Start (unstall) the external Base T PHY.
ixgbe_init_ext_t_x550em - Start ( unstall ) the external Base T PHY .
/* If PHY FW reset completed bit is set then this is the first
	 * SW instance after a power on so the PHY FW must be un-stalled.
	 */