From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id A588A2BA5 for ; Fri, 8 Mar 2019 18:47:57 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2019 19:47:55 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x28HloAJ002625; Fri, 8 Mar 2019 19:47:54 +0200 From: Yongseok Koh To: Xiaoyun Li Cc: Qi Zhang , dpdk stable Date: Fri, 8 Mar 2019 09:46:41 -0800 Message-Id: <20190308174749.30771-3-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190308174749.30771-1-yskoh@mellanox.com> References: <20190308174749.30771-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'net/i40e: fix using recovery mode firmware' has been queued to LTS release 17.11.6 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: , X-List-Received-Date: Fri, 08 Mar 2019 17:47:57 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 03/13/19. So please shout if anyone has objection. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. If the code is different (ie: not only metadata diffs), due for example to a change in context or macro names, please double check it. Thanks. Yongseok --- >>From 1562db97500391490bc04cca6ea524955e5868c1 Mon Sep 17 00:00:00 2001 From: Xiaoyun Li Date: Mon, 3 Dec 2018 15:07:46 +0800 Subject: [PATCH] net/i40e: fix using recovery mode firmware [ upstream commit 81b531cfc235149f68a40842abf0767a4fbfe994 ] Device can't function properly with a firmware that is in recovery mode. Check the firmware status at initialization time. If the firmware is in recovery mode, alert the user to check it. Signed-off-by: Xiaoyun Li Acked-by: Qi Zhang --- drivers/net/i40e/i40e_ethdev.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 4a80405a6..bcf995ce8 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1167,7 +1167,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); struct i40e_vsi *vsi; int ret; - uint32_t len; + uint32_t len, val; uint8_t aq_fail = 0; PMD_INIT_FUNC_TRACE(); @@ -1218,6 +1218,15 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) */ hw->switch_tag = 0xffff; + val = I40E_READ_REG(hw, I40E_GL_FWSTS); + if (val & I40E_GL_FWSTS_FWS1B_MASK) { + PMD_INIT_LOG(ERR, "\nERROR: " + "Firmware recovery mode detected. Limiting functionality.\n" + "Refer to the Intel(R) Ethernet Adapters and Devices " + "User Guide for details on firmware recovery mode."); + return -EIO; + } + /* Check if need to support multi-driver */ i40e_support_multi_driver(dev); -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-03-08 09:46:40.555108444 -0800 +++ 0003-net-i40e-fix-using-recovery-mode-firmware.patch 2019-03-08 09:46:39.934396000 -0800 @@ -1,16 +1,16 @@ -From 81b531cfc235149f68a40842abf0767a4fbfe994 Mon Sep 17 00:00:00 2001 +From 1562db97500391490bc04cca6ea524955e5868c1 Mon Sep 17 00:00:00 2001 From: Xiaoyun Li Date: Mon, 3 Dec 2018 15:07:46 +0800 Subject: [PATCH] net/i40e: fix using recovery mode firmware +[ upstream commit 81b531cfc235149f68a40842abf0767a4fbfe994 ] + Device can't function properly with a firmware that is in recovery mode. Check the firmware status at initialization time. If the firmware is in recovery mode, alert the user to check it. -Cc: stable@dpdk.org - Signed-off-by: Xiaoyun Li Acked-by: Qi Zhang --- @@ -18,10 +18,10 @@ 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c -index 552a7a566..f61a12eb2 100644 +index 4a80405a6..bcf995ce8 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c -@@ -1273,7 +1273,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) +@@ -1167,7 +1167,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); struct i40e_vsi *vsi; int ret; @@ -30,7 +30,7 @@ uint8_t aq_fail = 0; PMD_INIT_FUNC_TRACE(); -@@ -1324,6 +1324,15 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) +@@ -1218,6 +1218,15 @@ eth_i40e_dev_init(struct rte_eth_dev *dev) */ hw->switch_tag = 0xffff; @@ -45,7 +45,7 @@ + /* Check if need to support multi-driver */ i40e_support_multi_driver(dev); - /* Check if users want the latest supported vec path */ + -- 2.11.0