From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C0157A00E6 for ; Mon, 2 Sep 2019 11:56:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 57FC81E54F; Mon, 2 Sep 2019 11:56:24 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id B456F1C295; Mon, 2 Sep 2019 11:56:19 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2019 02:56:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,457,1559545200"; d="scan'208";a="176280831" Received: from yexl-server.sh.intel.com (HELO localhost) ([10.67.117.5]) by orsmga008.jf.intel.com with ESMTP; 02 Sep 2019 02:56:17 -0700 Date: Mon, 2 Sep 2019 17:54:28 +0800 From: Ye Xiaolong To: Zhang Xiao Cc: dev@dpdk.org, wei.zhao1@intel.com, stable@dpdk.org Message-ID: <20190902095428.GA4325@intel.com> References: <1567425132-59486-1-git-send-email-xiao.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1567425132-59486-1-git-send-email-xiao.zhang@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-stable] [dpdk-dev] net/ixgbe:fix wrong link status X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, Xiao This patch failed to apply on top of dpdk-next-net-intel/for-next-net, could you help to do a rebase? Thanks, Xiaolong On 09/02, Zhang Xiao wrote: >The link status for 82599eb got from link status register was not correct, >check the enable/disable flag of tx laser when getting the link status, >set the link status down if tx laser disabled since the tx laser flag >could be set correctly when up/down the link status. > >Fixes: dc66e5fd01b9 ("net/ixgbe: improve link state check on VF") >Cc: stable@dpdk.org > >Signed-off-by: Zhang Xiao >--- > drivers/net/ixgbe/ixgbe_ethdev.c | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c >index 87d2ad0..fc06a1a 100644 >--- a/drivers/net/ixgbe/ixgbe_ethdev.c >+++ b/drivers/net/ixgbe/ixgbe_ethdev.c >@@ -2864,6 +2864,7 @@ ixgbe_dev_set_link_up(struct rte_eth_dev *dev) > } else { > /* Turn on the laser */ > ixgbe_enable_tx_laser(hw); >+ ixgbe_dev_link_update(dev, 0); > } > > return 0; >@@ -2894,6 +2895,7 @@ ixgbe_dev_set_link_down(struct rte_eth_dev *dev) > } else { > /* Turn off the laser */ > ixgbe_disable_tx_laser(hw); >+ ixgbe_dev_link_update(dev, 0); > } > > return 0; >@@ -3967,6 +3969,7 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, > u32 speed = 0; > int wait = 1; > bool autoneg = false; >+ u32 esdp_reg; > > memset(&link, 0, sizeof(link)); > link.link_status = ETH_LINK_DOWN; >@@ -3999,6 +4002,10 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, > return rte_eth_linkstatus_set(dev, &link); > } > >+ esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP); >+ if ((esdp_reg & IXGBE_ESDP_SDP3)) >+ link_up = 0; >+ > if (link_up == 0) { > intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG; > return rte_eth_linkstatus_set(dev, &link); >-- >2.7.4 >