src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_start_mac_link_raptor(struct txgbe_hw *hw,
			       bool autoneg_wait_to_complete)
{
	s32 status = 0;
	bool got_lock = false;

	DEBUGFUNC("txgbe_start_mac_link_raptor");

	UNREFERENCED_PARAMETER(autoneg_wait_to_complete);

	/*  reset_pipeline requires us to hold this lock as it writes to
	 *  AUTOC.
	 */
	if (txgbe_verify_lesm_fw_enabled_raptor(hw)) {
		status = hw->mac.acquire_swfw_sync(hw, TXGBE_MNGSEM_SWPHY);
		if (status != 0)
			goto out;

		got_lock = true;
	}

	/* Restart link */
	txgbe_reset_pipeline_raptor(hw);

	if (got_lock)
		hw->mac.release_swfw_sync(hw, TXGBE_MNGSEM_SWPHY);

	/* Add delay to filter out noises during initial link setup */
	msec_delay(50);

out:
	return status;
}
/**
 *  txgbe_start_mac_link_raptor - Setup MAC link settings
 *  @hw: pointer to hardware structure
 *  @autoneg_wait_to_complete: true when waiting for completion is needed
 *
 *  Configures link settings based on values in the txgbe_hw struct.
 *  Restarts the link.  Performs autonegotiation if needed.
 **/
Setup MAC link settings
@hw: pointer to hardware structure
@autoneg_wait_to_complete: true when waiting for completion is needed

Configures link settings based on values in the txgbe_hw struct.
Restarts the link.  Performs autonegotiation if needed.
Setup MAC link settings @hw : pointer to hardware structure @autoneg_wait_to_complete : true when waiting for completion is needed Configures link settings based on values in the txgbe_hw struct . Restarts the link . Performs autonegotiation if needed .
s32 txgbe_start_mac_link_raptor(struct txgbe_hw *hw,
			       bool autoneg_wait_to_complete)
{
	s32 status = 0;
	bool got_lock = false;
	DEBUGFUNC("txgbe_start_mac_link_raptor");
	UNREFERENCED_PARAMETER(autoneg_wait_to_complete);
	if (txgbe_verify_lesm_fw_enabled_raptor(hw)) {
		status = hw->mac.acquire_swfw_sync(hw, TXGBE_MNGSEM_SWPHY);
		if (status != 0)
			goto out;
		got_lock = true;
	}
	txgbe_reset_pipeline_raptor(hw);
	if (got_lock)
		hw->mac.release_swfw_sync(hw, TXGBE_MNGSEM_SWPHY);
	msec_delay(50);
out:
	return status;
}
s32 txgbe_start_mac_link_raptor ( struct txgbe_hw * hw , bool autoneg_wait_to_complete ) { s32 status = 0 ; bool got_lock = false ; DEBUGFUNC ( " " ) ; UNREFERENCED_PARAMETER ( autoneg_wait_to_complete ) ; if ( txgbe_verify_lesm_fw_enabled_raptor ( hw ) ) { status = hw -> mac . acquire_swfw_sync ( hw , TXGBE_MNGSEM_SWPHY ) ; if ( status != 0 ) goto out ; got_lock = true ; } txgbe_reset_pipeline_raptor ( hw ) ; if ( got_lock ) hw -> mac . release_swfw_sync ( hw , TXGBE_MNGSEM_SWPHY ) ; msec_delay ( 50 ) ; out : return status ; }
txgbe_start_mac_link_raptor - Setup MAC link settings
  @hw: pointer to hardware structure
  @autoneg_wait_to_complete: true when waiting for completion is needed
txgbe_start_mac_link_raptor - Setup MAC link settings @hw : pointer to hardware structure @autoneg_wait_to_complete : true when waiting for completion is needed
/*  reset_pipeline requires us to hold this lock as it writes to
	 *  AUTOC.
	 */ /* Restart link */ /* Add delay to filter out noises during initial link setup */