Commit 7c5b8323 authored by Don Skidmore's avatar Don Skidmore Committed by David S. Miller

ixgbe: Fix ethtool output with advertised mode.

Ethtool tries to get advertised speed from phy.autoneg_advertised.
However for copper media this wasn't happening until later do to
an other fix which moved mac.ops.setup_link_speed placement in
ixgbe_link_config(). This patch will display the default advertised
speeds if it can't yet get this information from phy.autoneg_advertised.
Signed-off-by: default avatarDon Skidmore <donald.c.skidmore@intel.com>
Acked-by: default avatarMallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
Acked-by: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b453368d
...@@ -129,6 +129,15 @@ static int ixgbe_get_settings(struct net_device *netdev, ...@@ -129,6 +129,15 @@ static int ixgbe_get_settings(struct net_device *netdev,
ecmd->advertising |= ADVERTISED_10000baseT_Full; ecmd->advertising |= ADVERTISED_10000baseT_Full;
if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL) if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_FULL)
ecmd->advertising |= ADVERTISED_1000baseT_Full; ecmd->advertising |= ADVERTISED_1000baseT_Full;
/*
* It's possible that phy.autoneg_advertised may not be
* set yet. If so display what the default would be -
* both 1G and 10G supported.
*/
if (!(ecmd->advertising & (ADVERTISED_1000baseT_Full |
ADVERTISED_10000baseT_Full)))
ecmd->advertising |= (ADVERTISED_10000baseT_Full |
ADVERTISED_1000baseT_Full);
ecmd->port = PORT_TP; ecmd->port = PORT_TP;
} else if (hw->phy.media_type == ixgbe_media_type_backplane) { } else if (hw->phy.media_type == ixgbe_media_type_backplane) {
......
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