From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E90A35678 for ; Sun, 4 Dec 2016 07:35:50 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 03 Dec 2016 22:35:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,740,1477983600"; d="scan'208";a="908483951" Received: from dpdk4.bj.intel.com ([172.16.182.178]) by orsmga003.jf.intel.com with ESMTP; 03 Dec 2016 22:35:48 -0800 From: Wei Dai To: helin.zhang@intel.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, Wei Dai Date: Sun, 4 Dec 2016 14:31:31 +0800 Message-Id: <1480833100-48545-20-git-send-email-wei.dai@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480833100-48545-1-git-send-email-wei.dai@intel.com> References: <1480833100-48545-1-git-send-email-wei.dai@intel.com> Subject: [dpdk-dev] [PATCH 20/29] net/ixgbe/base: add physical layer options for FW PHY type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2016 06:35:51 -0000 The "FW" PHY type now supports speeds 10M, 100M, and 1G. Previously, only the 1G speed was reported in the ixgbe_get_supported_physical_layer_X550em() function for this PHY type. This patch is to add the 10M and 100M options. Signed-off-by: Wei Dai --- drivers/net/ixgbe/base/ixgbe_type.h | 1 + drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_type.h b/drivers/net/ixgbe/base/ixgbe_type.h index 6ab466b..9851d84 100644 --- a/drivers/net/ixgbe/base/ixgbe_type.h +++ b/drivers/net/ixgbe/base/ixgbe_type.h @@ -3426,6 +3426,7 @@ typedef u32 ixgbe_physical_layer; #define IXGBE_PHYSICAL_LAYER_10GBASE_XAUI 0x1000 #define IXGBE_PHYSICAL_LAYER_SFP_ACTIVE_DA 0x2000 #define IXGBE_PHYSICAL_LAYER_1000BASE_SX 0x4000 +#define IXGBE_PHYSICAL_LAYER_10BASE_T 0x8000 /* Flow Control Data Sheet defined values * Calculation and defines taken from 802.1bb Annex O diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 0011f21..f1f1fbe 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -3784,7 +3784,13 @@ u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_T; break; case ixgbe_phy_fw: - physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_T; + if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_1GB_FULL) + physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_T; + if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_100_FULL) + physical_layer |= IXGBE_PHYSICAL_LAYER_100BASE_TX; + if (hw->phy.speeds_supported & IXGBE_LINK_SPEED_10_FULL) + physical_layer |= IXGBE_PHYSICAL_LAYER_10BASE_T; + break; default: break; } -- 2.7.4