From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C897658E8 for ; Mon, 9 Feb 2015 17:10:38 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 09 Feb 2015 08:10:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,544,1418112000"; d="scan'208";a="524825064" Received: from debian-x64.ch.intel.com ([10.2.63.136]) by orsmga003.jf.intel.com with ESMTP; 09 Feb 2015 08:02:30 -0800 Date: Mon, 9 Feb 2015 08:52:25 -0700 From: Patrick Lu To: Cunming Liang Message-ID: <20150209155225.GB18872@debian-x64.ch.intel.com> References: <1423125918-31757-1-git-send-email-cunming.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423125918-31757-1-git-send-email-cunming.liang@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [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: Mon, 09 Feb 2015 16:10:40 -0000 On Thu, Feb 05, 2015 at 04:45:18PM +0800, Cunming Liang wrote: > 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 > Acked-by: Patrick Lu