From patchwork Wed Apr 1 07:33:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 25467 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id CFA36DDDF3 for ; Wed, 1 Apr 2009 18:33:31 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760078AbZDAHd2 (ORCPT ); Wed, 1 Apr 2009 03:33:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759218AbZDAHd2 (ORCPT ); Wed, 1 Apr 2009 03:33:28 -0400 Received: from qmta04.westchester.pa.mail.comcast.net ([76.96.62.40]:58941 "EHLO QMTA04.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759196AbZDAHd1 (ORCPT ); Wed, 1 Apr 2009 03:33:27 -0400 Received: from OMTA08.westchester.pa.mail.comcast.net ([76.96.62.12]) by QMTA04.westchester.pa.mail.comcast.net with comcast id a7Z51b0040Fqzac547ZRX3; Wed, 01 Apr 2009 07:33:25 +0000 Received: from lost.foo-projects.org ([63.64.152.142]) by OMTA08.westchester.pa.mail.comcast.net with comcast id a7c01b00A34bfcX3U7c3EK; Wed, 01 Apr 2009 07:36:20 +0000 From: Jeff Kirsher Subject: [PATCH 2/9] ixgbe: Fix ethtool output with advertised mode. To: davem@davemloft.net Cc: netdev@vger.kernel.org, gospo@redhat.com, Don Skidmore , Mallikarjuna R Chilakala , Peter P Waskiewicz Jr , Jeff Kirsher Date: Wed, 01 Apr 2009 00:33:02 -0700 Message-ID: <20090401073302.3749.35697.stgit@lost.foo-projects.org> In-Reply-To: <20090401073241.3749.36391.stgit@lost.foo-projects.org> References: <20090401073241.3749.36391.stgit@lost.foo-projects.org> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Don Skidmore 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 Acked-by: Mallikarjuna R Chilakala Acked-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher --- drivers/net/ixgbe/ixgbe_ethtool.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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) {