src/dpdk/drivers/net/ixgbe/base/ixgbe_x550.c
s32 ixgbe_setup_mac_link_t_X550em(struct ixgbe_hw *hw,
				  ixgbe_link_speed speed,
				  bool autoneg_wait_to_complete)
{
	s32 status;
	ixgbe_link_speed force_speed;
	u32 i;
	bool link_up = false;

	DEBUGFUNC("ixgbe_setup_mac_link_t_X550em");

	/* Setup internal/external PHY link speed to iXFI (10G), unless
	 * only 1G is auto advertised then setup KX link.
	 */
	if (speed & IXGBE_LINK_SPEED_10GB_FULL)
		force_speed = IXGBE_LINK_SPEED_10GB_FULL;
	else
		force_speed = IXGBE_LINK_SPEED_1GB_FULL;

	/* If X552 and internal link mode is XFI, then setup XFI internal link.
	 */
	if (hw->mac.type == ixgbe_mac_X550EM_x &&
	    !(hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE)) {
		status = ixgbe_setup_ixfi_x550em(hw, &force_speed);

		if (status != IXGBE_SUCCESS)
			return status;

		/* Wait for the controller to acquire link */
		for (i = 0; i < 10; i++) {
			msec_delay(100);

			status = ixgbe_check_link(hw, &force_speed, &link_up,
						  false);
			if (status != IXGBE_SUCCESS)
				return status;

			if (link_up)
				break;
		}
	}

	return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait_to_complete);
}
/**
 * ixgbe_setup_mac_link_t_X550em - Sets the auto advertised link speed
 * @hw: pointer to hardware structure
 * @speed: new link speed
 * @autoneg_wait_to_complete: true when waiting for completion is needed
 *
 * Setup internal/external PHY link speed based on link speed, then set
 * external PHY auto advertised link speed.
 *
 * Returns error status for any failure
 **/
Sets the auto advertised link speed
@hw: pointer to hardware structure
@speed: new link speed
@autoneg_wait_to_complete: true when waiting for completion is needed

Setup internal/external PHY link speed based on link speed, then set
external PHY auto advertised link speed.

Returns error status for any failure
Sets the auto advertised link speed @hw : pointer to hardware structure @speed : new link speed @autoneg_wait_to_complete : true when waiting for completion is needed Setup internal / external PHY link speed based on link speed then set external PHY auto advertised link speed . Returns error status for any failure
s32 ixgbe_setup_mac_link_t_X550em(struct ixgbe_hw *hw,
				  ixgbe_link_speed speed,
				  bool autoneg_wait_to_complete)
{
	s32 status;
	ixgbe_link_speed force_speed;
	u32 i;
	bool link_up = false;
	DEBUGFUNC("ixgbe_setup_mac_link_t_X550em");
	if (speed & IXGBE_LINK_SPEED_10GB_FULL)
		force_speed = IXGBE_LINK_SPEED_10GB_FULL;
	else
		force_speed = IXGBE_LINK_SPEED_1GB_FULL;
	if (hw->mac.type == ixgbe_mac_X550EM_x &&
	    !(hw->phy.nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE)) {
		status = ixgbe_setup_ixfi_x550em(hw, &force_speed);
		if (status != IXGBE_SUCCESS)
			return status;
		for (i = 0; i < 10; i++) {
			msec_delay(100);
			status = ixgbe_check_link(hw, &force_speed, &link_up,
						  false);
			if (status != IXGBE_SUCCESS)
				return status;
			if (link_up)
				break;
		}
	}
	return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait_to_complete);
}
s32 ixgbe_setup_mac_link_t_X550em ( struct ixgbe_hw * hw , ixgbe_link_speed speed , bool autoneg_wait_to_complete ) { s32 status ; ixgbe_link_speed force_speed ; u32 i ; bool link_up = false ; DEBUGFUNC ( " " ) ; if ( speed & IXGBE_LINK_SPEED_10GB_FULL ) force_speed = IXGBE_LINK_SPEED_10GB_FULL ; else force_speed = IXGBE_LINK_SPEED_1GB_FULL ; if ( hw -> mac . type == ixgbe_mac_X550EM_x && ! ( hw -> phy . nw_mng_if_sel & IXGBE_NW_MNG_IF_SEL_INT_PHY_MODE ) ) { status = ixgbe_setup_ixfi_x550em ( hw , & force_speed ) ; if ( status != IXGBE_SUCCESS ) return status ; for ( i = 0 ; i < 10 ; i ++ ) { msec_delay ( 100 ) ; status = ixgbe_check_link ( hw , & force_speed , & link_up , false ) ; if ( status != IXGBE_SUCCESS ) return status ; if ( link_up ) break ; } } return hw -> phy . ops . setup_link_speed ( hw , speed , autoneg_wait_to_complete ) ; }
ixgbe_setup_mac_link_t_X550em - Sets the auto advertised link speed
 @hw: pointer to hardware structure
 @speed: new link speed
 @autoneg_wait_to_complete: true when waiting for completion is needed
ixgbe_setup_mac_link_t_X550em - Sets the auto advertised link speed @hw : pointer to hardware structure @speed : new link speed @autoneg_wait_to_complete : true when waiting for completion is needed
/* Setup internal/external PHY link speed to iXFI (10G), unless
	 * only 1G is auto advertised then setup KX link.
	 */ /* If X552 and internal link mode is XFI, then setup XFI internal link.
	 */ /* Wait for the controller to acquire link */