Commit 5b9c3cdd authored by Don Skidmore's avatar Don Skidmore Committed by David S. Miller
Browse files

ixgbe: fix slow load times on 82598 nics

Load times for NICs that use i2c to communicate with the phy were taking
~4.5 sec per port.  This fix first checks to see if the link is already
up before calling get_link_capabilities, since if it is we don't need
query the phy for link state.
Signed-off-by: default avatarDon Skidmore <>
Signed-off-by: default avatarPeter P Waskiewicz Jr <>
Signed-off-by: default avatarJeff Kirsher <>
Signed-off-by: default avatarDavid S. Miller <>
parent afcf1242
......@@ -3901,16 +3901,27 @@ static void ixgbe_netpoll(struct net_device *netdev)
static int ixgbe_link_config(struct ixgbe_hw *hw)
u32 autoneg = IXGBE_LINK_SPEED_10GB_FULL;
u32 autoneg;
bool link_up = false;
/* must always autoneg for both 1G and 10G link */
hw->mac.autoneg = true;
if (hw->mac.ops.check_link)
ret = hw->mac.ops.check_link(hw, &autoneg, &link_up, false);
if ((hw->mac.type == ixgbe_mac_82598EB) &&
(hw->phy.media_type == ixgbe_media_type_copper))
if (ret || !link_up)
goto link_cfg_out;
return hw->mac.ops.setup_link_speed(hw, autoneg, true, true);
if (hw->mac.ops.get_link_capabilities)
ret = hw->mac.ops.get_link_capabilities(hw, &autoneg,
if (ret)
goto link_cfg_out;
if (hw->mac.ops.setup_link_speed)
ret = hw->mac.ops.setup_link_speed(hw, autoneg, true, true);
return ret;
static const struct net_device_ops ixgbe_netdev_ops = {
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