ixgbe: Fix ethtool output with advertised mode.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, April 2, 2009 - 10:06 pm

Gitweb:     http://git.kernel.org/linus/7c5b83230a22d0e14375e5f283b8aaf3320ebd86
Commit:     7c5b83230a22d0e14375e5f283b8aaf3320ebd86
Parent:     b453368dfd74ba5a49bfaa853251212fa306e70d
Author:     Don Skidmore <donald.c.skidmore@intel.com>
AuthorDate: Tue Mar 31 21:33:02 2009 +0000
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Thu Apr 2 01:02:27 2009 -0700

    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: Don Skidmore <donald.c.skidmore@intel.com>
    Acked-by: Mallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>
    Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
    Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
---
 drivers/net/ixgbe/ixgbe_ethtool.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 18ecba7..34b4a84 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -129,6 +129,15 @@ static int ixgbe_get_settings(struct net_device *netdev,
 			ecmd->advertising |= ADVERTISED_10000baseT_Full;
 		if (hw->phy.autoneg_advertised & IXGBE_LINK_SPEED_1GB_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;
 	} else if (hw->phy.media_type == ixgbe_media_type_backplane) {
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ixgbe: Fix ethtool output with advertised mode., Linux Kernel Mailing ..., (Thu Apr 2, 10:06 pm)