Commit 3ead7c2e authored by Paul Greenwalt's avatar Paul Greenwalt Committed by Jeff Kirsher

ixgbe: advertise highest capable link speed

On module insert advertise highest capable link speed. If module is
capable of 10G, then advertise 10G, else advertise modules capable
link speeds.
Signed-off-by: default avatarPaul Greenwalt <paul.greenwalt@intel.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 09099ddf
...@@ -7656,6 +7656,7 @@ static void ixgbe_sfp_detection_subtask(struct ixgbe_adapter *adapter) ...@@ -7656,6 +7656,7 @@ static void ixgbe_sfp_detection_subtask(struct ixgbe_adapter *adapter)
static void ixgbe_sfp_link_config_subtask(struct ixgbe_adapter *adapter) static void ixgbe_sfp_link_config_subtask(struct ixgbe_adapter *adapter)
{ {
struct ixgbe_hw *hw = &adapter->hw; struct ixgbe_hw *hw = &adapter->hw;
u32 cap_speed;
u32 speed; u32 speed;
bool autoneg = false; bool autoneg = false;
...@@ -7668,16 +7669,14 @@ static void ixgbe_sfp_link_config_subtask(struct ixgbe_adapter *adapter) ...@@ -7668,16 +7669,14 @@ static void ixgbe_sfp_link_config_subtask(struct ixgbe_adapter *adapter)
adapter->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG; adapter->flags &= ~IXGBE_FLAG_NEED_LINK_CONFIG;
speed = hw->phy.autoneg_advertised; hw->mac.ops.get_link_capabilities(hw, &cap_speed, &autoneg);
if ((!speed) && (hw->mac.ops.get_link_capabilities)) {
hw->mac.ops.get_link_capabilities(hw, &speed, &autoneg);
/* setup the highest link when no autoneg */ /* advertise highest capable link speed */
if (!autoneg) { if (!autoneg && (cap_speed & IXGBE_LINK_SPEED_10GB_FULL))
if (speed & IXGBE_LINK_SPEED_10GB_FULL)
speed = IXGBE_LINK_SPEED_10GB_FULL; speed = IXGBE_LINK_SPEED_10GB_FULL;
} else
} speed = cap_speed & (IXGBE_LINK_SPEED_10GB_FULL |
IXGBE_LINK_SPEED_1GB_FULL);
if (hw->mac.ops.setup_link) if (hw->mac.ops.setup_link)
hw->mac.ops.setup_link(hw, speed, true); hw->mac.ops.setup_link(hw, speed, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment