From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3611EA04A6; Wed, 9 Feb 2022 11:36:48 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C18AE426D4; Wed, 9 Feb 2022 11:36:03 +0100 (CET) Received: from smtpproxy21.qq.com (smtpbg702.qq.com [203.205.195.102]) by mails.dpdk.org (Postfix) with ESMTP id 89B6441141 for ; Wed, 9 Feb 2022 11:36:01 +0100 (CET) X-QQ-mid: bizesmtp37t1644402955tor112ej Received: from wxdbg.localdomain.com (unknown [183.129.236.74]) by bizesmtp.qq.com (ESMTP) with id ; Wed, 09 Feb 2022 18:35:54 +0800 (CST) X-QQ-SSF: 01400000002000F0L000B00A0000000 X-QQ-FEAT: AYaL7CbwjQ2rINL3AQrLbUquQirEO+h1dtOumtrQl++l0tIi/OpTirCO/xdaT jSBRHUxa9pEXbUqTor+m2Lg03n/jXJBUuEzD+4JST3Ei2GjNg+6xLJ0JwT4UZ5b42MlwHFB oGqgybUK3XmCQMzdU8OVYxzXlnNgJMpzGWkTXomF3/hrl5h8lrnbbrjyUlP1A5dgai5OMZc a8Sqn8KqwTGoSByXOgqrnzfCYADybSHNa5obRRew+aR+dHiUNq1U2ChWTu5Uf3UNScAJ/Tz IM+QnuxXsKgPZ4zMGR9vBXaoTECayaYdQEj6h/izcplqGW4eNXrvHqvg9X2VsPWMWqOulPa jY0bbozhQ4tl3vJRdKmvRjaE3CVOxngNvwOcvbrlvgvj5wiLY8= X-QQ-GoodBg: 2 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu , stable@dpdk.org Subject: [PATCH v2 11/12] net/txgbe: fix to set link up and down Date: Wed, 9 Feb 2022 18:42:12 +0800 Message-Id: <20220209104213.602728-12-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220209104213.602728-1-jiawenwu@trustnetic.com> References: <20220209104213.602728-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgforeign:qybgforeign7 X-QQ-Bgrelay: 1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add hw->dev_start status in the flow of setting link up/down, to avoid obtaining link status inconsistent with the settings. Fixes: 12a653eb53e1 ("net/txgbe: fix link status when device stopped") Cc: stable@dpdk.org Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index 4799a60116..6bc209e661 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -1937,6 +1937,7 @@ txgbe_dev_set_link_up(struct rte_eth_dev *dev) } else { /* Turn on the laser */ hw->mac.enable_tx_laser(hw); + hw->dev_start = true; txgbe_dev_link_update(dev, 0); } @@ -1957,6 +1958,7 @@ txgbe_dev_set_link_down(struct rte_eth_dev *dev) } else { /* Turn off the laser */ hw->mac.disable_tx_laser(hw); + hw->dev_start = false; txgbe_dev_link_update(dev, 0); } -- 2.21.0.windows.1