From patchwork Sun Sep 25 09:00:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Wang X-Patchwork-Id: 16098 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 B791D68F5; Sun, 25 Sep 2016 11:02:15 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id A19DB8DA0 for ; Sun, 25 Sep 2016 11:01:59 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 25 Sep 2016 02:01:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,392,1470726000"; d="scan'208";a="13460239" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga004.jf.intel.com with ESMTP; 25 Sep 2016 02:01:58 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u8P91ux3020274; Sun, 25 Sep 2016 17:01:56 +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 u8P91rWa006199; Sun, 25 Sep 2016 17:01:55 +0800 Received: (from xiaowan1@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u8P91rus006195; Sun, 25 Sep 2016 17:01:53 +0800 From: Xiao Wang To: wenzhuo.lu@intel.com Cc: dev@dpdk.org, ferruh.yigit@intel.com, Xiao Wang Date: Sun, 25 Sep 2016 17:00:15 +0800 Message-Id: <1474794017-5896-39-git-send-email-xiao.w.wang@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1474794017-5896-1-git-send-email-xiao.w.wang@intel.com> References: <1472312902-16963-2-git-send-email-xiao.w.wang@intel.com> <1474794017-5896-1-git-send-email-xiao.w.wang@intel.com> Subject: [dpdk-dev] [PATCH v2 38/40] net/ixgbe/base: do not skip PHY configuration 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" By exiting early we could skip the PHY configuration and as such the driver may not configure the PHY correctly for SFP+. This patch removes the logic which would previously skip the PHY configuration in the case where we are already at the requested speed in ixgbe_setup_mac_link_multispeed_fiber(). Signed-off-by: Xiao Wang --- drivers/net/ixgbe/base/ixgbe_common.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_common.c b/drivers/net/ixgbe/base/ixgbe_common.c index e0dc3b5..8230ae1 100644 --- a/drivers/net/ixgbe/base/ixgbe_common.c +++ b/drivers/net/ixgbe/base/ixgbe_common.c @@ -5060,14 +5060,6 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, speedcnt++; highest_link_speed = IXGBE_LINK_SPEED_10GB_FULL; - /* If we already have link at this speed, just jump out */ - status = ixgbe_check_link(hw, &link_speed, &link_up, false); - if (status != IXGBE_SUCCESS) - return status; - - if ((link_speed == IXGBE_LINK_SPEED_10GB_FULL) && link_up) - goto out; - /* Set the module link speed */ switch (hw->phy.media_type) { case ixgbe_media_type_fiber: @@ -5118,14 +5110,6 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw, if (highest_link_speed == IXGBE_LINK_SPEED_UNKNOWN) highest_link_speed = IXGBE_LINK_SPEED_1GB_FULL; - /* If we already have link at this speed, just jump out */ - status = ixgbe_check_link(hw, &link_speed, &link_up, false); - if (status != IXGBE_SUCCESS) - return status; - - if ((link_speed == IXGBE_LINK_SPEED_1GB_FULL) && link_up) - goto out; - /* Set the module link speed */ switch (hw->phy.media_type) { case ixgbe_media_type_fiber: