From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id F1A91B427 for ; Thu, 5 Feb 2015 09:45:45 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 05 Feb 2015 00:45:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="450142747" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 05 Feb 2015 00:31:27 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t158jdUp006426; Thu, 5 Feb 2015 16:45:39 +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 t158jaJ7031797; Thu, 5 Feb 2015 16:45:38 +0800 Received: (from cliang18@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t158jafK031793; Thu, 5 Feb 2015 16:45:36 +0800 From: Cunming Liang To: dev@dpdk.org Date: Thu, 5 Feb 2015 16:45:18 +0800 Message-Id: <1423125918-31757-1-git-send-email-cunming.liang@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH v1] ixgbe: fix link issue in loopback mode 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: , X-List-Received-Date: Thu, 05 Feb 2015 08:45:46 -0000 In loopback mode, it's expected force link up even when there's no cable connect. But in codes, setup_sfp() rewrites the related register. It causes in the case 'multispeed_fiber', it can't link up without cable connect. Signed-off-by: Cunming Liang --- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index b341dd0..d6d408e 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -1501,6 +1501,11 @@ ixgbe_dev_start(struct rte_eth_dev *dev) goto error; } + /* Skip link setup if loopback mode is enabled for 82599. */ + if (hw->mac.type == ixgbe_mac_82599EB && + dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX) + goto skip_link_setup; + if (ixgbe_is_sfp(hw) && hw->phy.multispeed_fiber) { err = hw->mac.ops.setup_sfp(hw); if (err) @@ -1510,11 +1515,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) /* Turn on the laser */ ixgbe_enable_tx_laser(hw); - /* Skip link setup if loopback mode is enabled for 82599. */ - if (hw->mac.type == ixgbe_mac_82599EB && - dev->data->dev_conf.lpbk_mode == IXGBE_LPBK_82599_TX_RX) - goto skip_link_setup; - err = ixgbe_check_link(hw, &speed, &link_up, 0); if (err) goto error; -- 1.8.1.4