From patchwork Sat Aug 27 15:47:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Wang X-Patchwork-Id: 15468 X-Patchwork-Delegate: bruce.richardson@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 44394591F; Sat, 27 Aug 2016 17:48:51 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 66BE1590B for ; Sat, 27 Aug 2016 17:48:44 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP; 27 Aug 2016 08:48:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,587,1464678000"; d="scan'208";a="1859654" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga004.jf.intel.com with ESMTP; 27 Aug 2016 08:48:42 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u7RFmeQF007401; Sat, 27 Aug 2016 23:48:40 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u7RFmbKN017026; Sat, 27 Aug 2016 23:48:39 +0800 Received: (from xiaowan1@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u7RFmb1x017022; Sat, 27 Aug 2016 23:48:37 +0800 From: Xiao Wang To: wenzhuo.lu@intel.com Cc: dev@dpdk.org, Xiao Wang Date: Sat, 27 Aug 2016 23:47:47 +0800 Message-Id: <1472312902-16963-5-git-send-email-xiao.w.wang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1472312902-16963-1-git-send-email-xiao.w.wang@intel.com> References: <1472312902-16963-1-git-send-email-xiao.w.wang@intel.com> Subject: [dpdk-dev] [PATCH 04/39] net/ixgbe/base: add X550em_a 10G PHY support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch use the shared MDIO functions ixgbe_read_phy_reg_x550a and ixgbe_write_phy_reg_x550a for X550em_a 10G PHY which supports flow control auto-negotiation. Signed-off-by: Xiao Wang --- drivers/net/ixgbe/base/ixgbe_common.c | 1 + drivers/net/ixgbe/base/ixgbe_x550.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index 161bf32..e46af23 100644 --- a/drivers/net/ixgbe/base/ixgbe_common.c +++ b/drivers/net/ixgbe/base/ixgbe_common.c @@ -188,6 +188,7 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw) case IXGBE_DEV_ID_X550T: case IXGBE_DEV_ID_X550T1: case IXGBE_DEV_ID_X550EM_X_10G_T: + case IXGBE_DEV_ID_X550EM_A_10G_T: supported = true; break; default: diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index 2c80a9b..5c09bfe 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -494,9 +494,12 @@ STATIC s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) case IXGBE_DEV_ID_X550EM_A_KR_L: hw->phy.type = ixgbe_phy_x550em_kr; break; + case IXGBE_DEV_ID_X550EM_A_10G_T: + hw->phy.ops.read_reg = ixgbe_read_phy_reg_x550a; + hw->phy.ops.write_reg = ixgbe_write_phy_reg_x550a; + /* Fallthrough to ixgbe_identify_phy_generic */ case IXGBE_DEV_ID_X550EM_X_1G_T: case IXGBE_DEV_ID_X550EM_X_10G_T: - case IXGBE_DEV_ID_X550EM_A_10G_T: return ixgbe_identify_phy_generic(hw); case IXGBE_DEV_ID_X550EM_A_1G_T: case IXGBE_DEV_ID_X550EM_A_1G_T_L: