Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Catherine Sullivan <catherine.sullivan@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S15 05/15] i40e: Remove 100M SGMII unless hw is X722
Date: Thu,  3 Sep 2015 17:18:52 -0400	[thread overview]
Message-ID: <1441315142-173025-6-git-send-email-catherine.sullivan@intel.com> (raw)
In-Reply-To: <1441315142-173025-1-git-send-email-catherine.sullivan@intel.com>

Only the X722 device now supports 100M SGMII, and nothing supports
100M on 1000Base_T.

Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Change-ID: I6f44dcd818944edd40041410e6de380f4a359a0c
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 42 ++++++++++++++++----------
 1 file changed, 26 insertions(+), 16 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 185ac91..a22f1d9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -255,7 +255,8 @@ static void i40e_partition_setting_complaint(struct i40e_pf *pf)
  **/
 static void i40e_get_settings_link_up(struct i40e_hw *hw,
 				      struct ethtool_cmd *ecmd,
-				      struct net_device *netdev)
+				      struct net_device *netdev,
+				      struct i40e_pf *pf)
 {
 	struct i40e_link_status *hw_link_info = &hw->phy.link_info;
 	u32 link_speed = hw_link_info->link_speed;
@@ -299,16 +300,18 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
 		break;
 	case I40E_PHY_TYPE_10GBASE_T:
 	case I40E_PHY_TYPE_1000BASE_T:
-	case I40E_PHY_TYPE_100BASE_TX:
 		ecmd->supported = SUPPORTED_Autoneg |
 				  SUPPORTED_10000baseT_Full |
-				  SUPPORTED_1000baseT_Full |
-				  SUPPORTED_100baseT_Full;
+				  SUPPORTED_1000baseT_Full;
 		ecmd->advertising = ADVERTISED_Autoneg;
 		if (hw_link_info->requested_speeds & I40E_LINK_SPEED_10GB)
 			ecmd->advertising |= ADVERTISED_10000baseT_Full;
 		if (hw_link_info->requested_speeds & I40E_LINK_SPEED_1GB)
 			ecmd->advertising |= ADVERTISED_1000baseT_Full;
+		break;
+	case I40E_PHY_TYPE_100BASE_TX:
+		ecmd->supported = SUPPORTED_Autoneg |
+				  SUPPORTED_100baseT_Full;
 		if (hw_link_info->requested_speeds & I40E_LINK_SPEED_100MB)
 			ecmd->advertising |= ADVERTISED_100baseT_Full;
 		break;
@@ -328,12 +331,15 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
 		break;
 	case I40E_PHY_TYPE_SGMII:
 		ecmd->supported = SUPPORTED_Autoneg |
-				  SUPPORTED_1000baseT_Full |
-				  SUPPORTED_100baseT_Full;
+				  SUPPORTED_1000baseT_Full;
 		if (hw_link_info->requested_speeds & I40E_LINK_SPEED_1GB)
 			ecmd->advertising |= ADVERTISED_1000baseT_Full;
-		if (hw_link_info->requested_speeds & I40E_LINK_SPEED_100MB)
-			ecmd->advertising |= ADVERTISED_100baseT_Full;
+		if (pf->hw.mac.type == I40E_MAC_X722) {
+			ecmd->supported |= SUPPORTED_100baseT_Full;
+			if (hw_link_info->requested_speeds &
+			    I40E_LINK_SPEED_100MB)
+				ecmd->advertising |= ADVERTISED_100baseT_Full;
+		}
 		break;
 	/* Backplane is set based on supported phy types in get_settings
 	 * so don't set anything here but don't warn either
@@ -381,7 +387,8 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
  * Reports link settings that can be determined when link is down
  **/
 static void i40e_get_settings_link_down(struct i40e_hw *hw,
-					struct ethtool_cmd *ecmd)
+					struct ethtool_cmd *ecmd,
+					struct i40e_pf *pf)
 {
 	enum i40e_aq_capabilities_phy_type phy_types = hw->phy.phy_types;
 
@@ -392,11 +399,13 @@ static void i40e_get_settings_link_down(struct i40e_hw *hw,
 	ecmd->advertising = 0x0;
 	if (phy_types & I40E_CAP_PHY_TYPE_SGMII) {
 		ecmd->supported |= SUPPORTED_Autoneg |
-				   SUPPORTED_1000baseT_Full |
-				   SUPPORTED_100baseT_Full;
+				SUPPORTED_1000baseT_Full;
 		ecmd->advertising |= ADVERTISED_Autoneg |
-				     ADVERTISED_1000baseT_Full |
-				     ADVERTISED_100baseT_Full;
+				     ADVERTISED_1000baseT_Full;
+		if (pf->hw.mac.type == I40E_MAC_X722) {
+			ecmd->supported |= SUPPORTED_100baseT_Full;
+			ecmd->advertising |= ADVERTISED_100baseT_Full;
+		}
 	}
 	if (phy_types & I40E_CAP_PHY_TYPE_XAUI ||
 	    phy_types & I40E_CAP_PHY_TYPE_XFI ||
@@ -425,7 +434,8 @@ static void i40e_get_settings_link_down(struct i40e_hw *hw,
 		ecmd->advertising |= ADVERTISED_Autoneg |
 				    ADVERTISED_40000baseCR4_Full;
 	}
-	if (phy_types & I40E_CAP_PHY_TYPE_100BASE_TX) {
+	if ((phy_types & I40E_CAP_PHY_TYPE_100BASE_TX) &&
+	    !(phy_types & I40E_CAP_PHY_TYPE_1000BASE_T)) {
 		ecmd->supported |= SUPPORTED_Autoneg |
 				   SUPPORTED_100baseT_Full;
 		ecmd->advertising |= ADVERTISED_Autoneg |
@@ -467,9 +477,9 @@ static int i40e_get_settings(struct net_device *netdev,
 	bool link_up = hw_link_info->link_info & I40E_AQ_LINK_UP;
 
 	if (link_up)
-		i40e_get_settings_link_up(hw, ecmd, netdev);
+		i40e_get_settings_link_up(hw, ecmd, netdev, pf);
 	else
-		i40e_get_settings_link_down(hw, ecmd);
+		i40e_get_settings_link_down(hw, ecmd, pf);
 
 	/* Now set the settings that don't rely on link being up/down */
 
-- 
1.9.3


  parent reply	other threads:[~2015-09-03 21:18 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 21:18 [Intel-wired-lan] [next PATCH S15 00/15] i40e/i40evf updates Catherine Sullivan
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 01/15] i40e: Add missing parameter comment to ndo_bridge_setlink Catherine Sullivan
2015-09-10 22:17   ` Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 02/15] i40e: use priv flags to control flow director Catherine Sullivan
2015-09-10 22:26   ` Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 03/15] i40e: Change some messages from info to debug only Catherine Sullivan
2015-09-10 22:38   ` Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 04/15] i40e: Lock for VSI's MAC filter list Catherine Sullivan
2015-09-11 15:59   ` Bowers, AndrewX
2015-09-29 19:08   ` Jesse Brandeburg
2015-09-30 16:18     ` Sullivan, Catherine
2015-09-03 21:18 ` Catherine Sullivan [this message]
2015-09-11 16:03   ` [Intel-wired-lan] [next PATCH S15 05/15] i40e: Remove 100M SGMII unless hw is X722 Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 06/15] i40e/i40evf: Add WB_ON_ITR offload support Catherine Sullivan
2015-09-11 16:08   ` Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 07/15] i40e: remove obsolete version check Catherine Sullivan
2015-09-11 16:09   ` Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 08/15] i40e: allow FD SB if MFP mode only has 1 partition Catherine Sullivan
2015-09-11 16:11   ` Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 09/15] i40e: remove FD atr control from debugfs Catherine Sullivan
2015-09-11 16:14   ` Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 10/15] i40e/i40evf: remove redundant declarations of a variable and a function Catherine Sullivan
2015-09-11 16:16   ` Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 11/15] i40e: Store off PHY capabilities Catherine Sullivan
2015-09-11 16:20   ` Bowers, AndrewX
2015-09-03 21:18 ` [Intel-wired-lan] [next PATCH S15 12/15] i40e: X722 is on the IOSF bus and does not report the PCI bus info Catherine Sullivan
2015-09-22 21:17   ` Bowers, AndrewX
2015-09-03 21:19 ` [Intel-wired-lan] [next PATCH S15 13/15] i40e: remove unnecessary string copy operations Catherine Sullivan
2015-09-22 21:20   ` Bowers, AndrewX
2015-09-03 21:19 ` [Intel-wired-lan] [next PATCH S15 14/15] i40evf: speed up init Catherine Sullivan
2015-09-22 21:23   ` Bowers, AndrewX
2015-09-03 21:19 ` [Intel-wired-lan] [next PATCH S15 15/15] i40e/i40evf: Bump i40e version to 1.3.28 and i40evf to 1.3.19 Catherine Sullivan
2015-09-22 21:24   ` Bowers, AndrewX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441315142-173025-6-git-send-email-catherine.sullivan@intel.com \
    --to=catherine.sullivan@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox