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 9F07AA04C0; Wed, 13 Nov 2019 10:34:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 951981BF0A; Wed, 13 Nov 2019 10:34:31 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 069F01BED2; Wed, 13 Nov 2019 10:34:29 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2019 01:34:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,300,1569308400"; d="scan'208";a="235209214" Received: from intel.sh.intel.com ([10.239.255.129]) by fmsmga002.fm.intel.com with ESMTP; 13 Nov 2019 01:34:27 -0800 From: Cui LunyuanX To: dev@dpdk.org Cc: Wenzhuo Lu , Yang Qiming , Cui LunyuanX , stable@dpdk.org Date: Wed, 13 Nov 2019 17:32:43 +0000 Message-Id: <20191113173243.90826-1-lunyuanx.cui@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/e1000: fix link status update X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Unassigned variable should not be used as judgment, and there is no need to update link status according to old link status. This patch fix the issue. Fixes: 80ba61115e77 ("net/e1000: use link status helper functions") Cc: stable@dpdk.org Signed-off-by: Lunyuan Cui --- drivers/net/e1000/em_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 9a88b50b2..a3d39a935 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -1157,7 +1157,7 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete) memset(&link, 0, sizeof(link)); /* Now we check if a transition has happened */ - if (link_check && (link.link_status == ETH_LINK_DOWN)) { + if (link_check) { uint16_t duplex, speed; hw->mac.ops.get_link_up_info(hw, &speed, &duplex); link.link_duplex = (duplex == FULL_DUPLEX) ? -- 2.17.1