|
@@ -45,21 +45,17 @@ static void ixgbe_enable_tx_laser_multispeed_fiber(struct ixgbe_hw *hw);
|
|
|
static void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw);
|
|
|
static s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
|
|
|
ixgbe_link_speed speed,
|
|
|
- bool autoneg,
|
|
|
bool autoneg_wait_to_complete);
|
|
|
static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
|
|
|
ixgbe_link_speed speed,
|
|
|
- bool autoneg,
|
|
|
bool autoneg_wait_to_complete);
|
|
|
static s32 ixgbe_start_mac_link_82599(struct ixgbe_hw *hw,
|
|
|
bool autoneg_wait_to_complete);
|
|
|
static s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
|
|
|
ixgbe_link_speed speed,
|
|
|
- bool autoneg,
|
|
|
bool autoneg_wait_to_complete);
|
|
|
static s32 ixgbe_setup_copper_link_82599(struct ixgbe_hw *hw,
|
|
|
ixgbe_link_speed speed,
|
|
|
- bool autoneg,
|
|
|
bool autoneg_wait_to_complete);
|
|
|
static s32 ixgbe_verify_fw_version_82599(struct ixgbe_hw *hw);
|
|
|
|
|
@@ -510,14 +506,12 @@ static void ixgbe_flap_tx_laser_multispeed_fiber(struct ixgbe_hw *hw)
|
|
|
* ixgbe_setup_mac_link_multispeed_fiber - Set MAC link speed
|
|
|
* @hw: pointer to hardware structure
|
|
|
* @speed: new link speed
|
|
|
- * @autoneg: true if autonegotiation enabled
|
|
|
* @autoneg_wait_to_complete: true when waiting for completion is needed
|
|
|
*
|
|
|
* Set the link speed in the AUTOC register and restarts link.
|
|
|
**/
|
|
|
static s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
|
|
|
ixgbe_link_speed speed,
|
|
|
- bool autoneg,
|
|
|
bool autoneg_wait_to_complete)
|
|
|
{
|
|
|
s32 status = 0;
|
|
@@ -527,6 +521,7 @@ static s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
|
|
|
u32 esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP);
|
|
|
u32 i = 0;
|
|
|
bool link_up = false;
|
|
|
+ bool autoneg = false;
|
|
|
|
|
|
/* Mask off requested but non-supported speeds */
|
|
|
status = hw->mac.ops.get_link_capabilities(hw, &link_speed,
|
|
@@ -563,7 +558,6 @@ static s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
|
|
|
|
|
|
status = ixgbe_setup_mac_link_82599(hw,
|
|
|
IXGBE_LINK_SPEED_10GB_FULL,
|
|
|
- autoneg,
|
|
|
autoneg_wait_to_complete);
|
|
|
if (status != 0)
|
|
|
return status;
|
|
@@ -616,7 +610,6 @@ static s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
|
|
|
|
|
|
status = ixgbe_setup_mac_link_82599(hw,
|
|
|
IXGBE_LINK_SPEED_1GB_FULL,
|
|
|
- autoneg,
|
|
|
autoneg_wait_to_complete);
|
|
|
if (status != 0)
|
|
|
return status;
|
|
@@ -645,7 +638,6 @@ static s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
|
|
|
if (speedcnt > 1)
|
|
|
status = ixgbe_setup_mac_link_multispeed_fiber(hw,
|
|
|
highest_link_speed,
|
|
|
- autoneg,
|
|
|
autoneg_wait_to_complete);
|
|
|
|
|
|
out:
|
|
@@ -665,13 +657,12 @@ out:
|
|
|
* ixgbe_setup_mac_link_smartspeed - Set MAC link speed using SmartSpeed
|
|
|
* @hw: pointer to hardware structure
|
|
|
* @speed: new link speed
|
|
|
- * @autoneg: true if autonegotiation enabled
|
|
|
* @autoneg_wait_to_complete: true when waiting for completion is needed
|
|
|
*
|
|
|
* Implements the Intel SmartSpeed algorithm.
|
|
|
**/
|
|
|
static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
|
|
|
- ixgbe_link_speed speed, bool autoneg,
|
|
|
+ ixgbe_link_speed speed,
|
|
|
bool autoneg_wait_to_complete)
|
|
|
{
|
|
|
s32 status = 0;
|
|
@@ -702,7 +693,7 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
|
|
|
/* First, try to get link with full advertisement */
|
|
|
hw->phy.smart_speed_active = false;
|
|
|
for (j = 0; j < IXGBE_SMARTSPEED_MAX_RETRIES; j++) {
|
|
|
- status = ixgbe_setup_mac_link_82599(hw, speed, autoneg,
|
|
|
+ status = ixgbe_setup_mac_link_82599(hw, speed,
|
|
|
autoneg_wait_to_complete);
|
|
|
if (status != 0)
|
|
|
goto out;
|
|
@@ -737,7 +728,7 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
|
|
|
|
|
|
/* Turn SmartSpeed on to disable KR support */
|
|
|
hw->phy.smart_speed_active = true;
|
|
|
- status = ixgbe_setup_mac_link_82599(hw, speed, autoneg,
|
|
|
+ status = ixgbe_setup_mac_link_82599(hw, speed,
|
|
|
autoneg_wait_to_complete);
|
|
|
if (status != 0)
|
|
|
goto out;
|
|
@@ -763,7 +754,7 @@ static s32 ixgbe_setup_mac_link_smartspeed(struct ixgbe_hw *hw,
|
|
|
|
|
|
/* We didn't get link. Turn SmartSpeed back off. */
|
|
|
hw->phy.smart_speed_active = false;
|
|
|
- status = ixgbe_setup_mac_link_82599(hw, speed, autoneg,
|
|
|
+ status = ixgbe_setup_mac_link_82599(hw, speed,
|
|
|
autoneg_wait_to_complete);
|
|
|
|
|
|
out:
|
|
@@ -777,14 +768,13 @@ out:
|
|
|
* ixgbe_setup_mac_link_82599 - Set MAC link speed
|
|
|
* @hw: pointer to hardware structure
|
|
|
* @speed: new link speed
|
|
|
- * @autoneg: true if autonegotiation enabled
|
|
|
* @autoneg_wait_to_complete: true when waiting for completion is needed
|
|
|
*
|
|
|
* Set the link speed in the AUTOC register and restarts link.
|
|
|
**/
|
|
|
static s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
|
|
|
- ixgbe_link_speed speed, bool autoneg,
|
|
|
- bool autoneg_wait_to_complete)
|
|
|
+ ixgbe_link_speed speed,
|
|
|
+ bool autoneg_wait_to_complete)
|
|
|
{
|
|
|
s32 status = 0;
|
|
|
u32 autoc = IXGBE_READ_REG(hw, IXGBE_AUTOC);
|
|
@@ -798,6 +788,7 @@ static s32 ixgbe_setup_mac_link_82599(struct ixgbe_hw *hw,
|
|
|
u32 i;
|
|
|
ixgbe_link_speed link_capabilities = IXGBE_LINK_SPEED_UNKNOWN;
|
|
|
bool got_lock = false;
|
|
|
+ bool autoneg = false;
|
|
|
|
|
|
/* Check to see if speed passed in is supported. */
|
|
|
status = hw->mac.ops.get_link_capabilities(hw, &link_capabilities,
|
|
@@ -910,14 +901,12 @@ out:
|
|
|
* ixgbe_setup_copper_link_82599 - Set the PHY autoneg advertised field
|
|
|
* @hw: pointer to hardware structure
|
|
|
* @speed: new link speed
|
|
|
- * @autoneg: true if autonegotiation enabled
|
|
|
* @autoneg_wait_to_complete: true if waiting is needed to complete
|
|
|
*
|
|
|
* Restarts link on PHY and MAC based on settings passed in.
|
|
|
**/
|
|
|
static s32 ixgbe_setup_copper_link_82599(struct ixgbe_hw *hw,
|
|
|
ixgbe_link_speed speed,
|
|
|
- bool autoneg,
|
|
|
bool autoneg_wait_to_complete)
|
|
|
{
|
|
|
s32 status;
|