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 5616D4569C for ; Wed, 24 Jul 2024 13:35:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4B819433BE; Wed, 24 Jul 2024 13:35:20 +0200 (CEST) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mails.dpdk.org (Postfix) with ESMTP id 06B2C42D89 for ; Wed, 24 Jul 2024 13:35:19 +0200 (CEST) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-42122ac2f38so4788165e9.1 for ; Wed, 24 Jul 2024 04:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721820918; x=1722425718; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OZOihhPfVBBWCj8kumLJaFcNkLQBFUa+jS1MVS3TpZ8=; b=DG4DHK2wkf44j0G0GkCphIad85B+XcdGxHWx++2ns5qfdR0UU7CcqF5aTMIloJEYAC O/xoLOkF7TKT9rnBfMMR7TQZoluJPtnxEsha66TtGAifQQfO/GCoO9YdKscGtwP0g4C5 eto61o1ZqcRwYvgLxXdnceVT4FxaMglZPgxz2wBhr+n/kH0fXDF1Q6EbcmcZZ9KVpBod g9ai3h4jDKINyT9EB9aTJk4lz6buWxP/QBSqwbgCh84Uf9vzqAPi7ghTSZCgwfS6wdKO 4GJnA3/4H9YZSMDETvku8lo6fEkDbO6APXF9Id6bJLP3ebu711byji03+aMCx65QxQOc qcWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721820918; x=1722425718; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OZOihhPfVBBWCj8kumLJaFcNkLQBFUa+jS1MVS3TpZ8=; b=iyamoAC1Yxq+hmaNZ0y5ySW4m0ZxtfcAp6vK+CsxIiSBu2tWA1lSQBMTcCumbArKFA VWwaeCRB69s4BSfdp1RYWmebwyzKzn+iXZ6sz5hzU+HypFjTYO1e7yxlUlefDfDk5mTX plzcmcbXp4zX8SttVZmBlkl+RtTlwI4tBjBKjbsVh5VQcw0uMQzB6ISjgpQ/ENi+MrUz 4SZGlfYV3EzWfzEBVos7d7DfYExG9ZGoaXe9TDY0JCi0aSw1X/SQ1NCWO5feVC9P/cvu CHfWf4nXt6Q0u7McuD4IITImOwWiL6Jo9Vsz12y+eCg7QvPFiuWFYj0JOcQwNb7B1mtF joKw== X-Forwarded-Encrypted: i=1; AJvYcCUFAi4FqGOYfa3EVC6E8ryMWjhnj4vux8n95oEfaTMikFJq2L1Jxy0CChORufsM6PTCnWP05IqVXbZkDTVeMVc= X-Gm-Message-State: AOJu0YwYNnUIN4/hlWw+Fpz7jfhp9BRmwXpR0f0Svqjp/A2eiRLpCBT9 N+LYSb5OxhV8OCX9l8cij8Lv3Rds0Vqa9JCd9hySnJeZu66jY0LC1lRP3RiUX8A= X-Google-Smtp-Source: AGHT+IFj688uCbj1pOzUk2EEHfImSeN3jURluDO/uhmXUqya0B3zStcAgSmpVgoGo45Q6nn+qOC/OQ== X-Received: by 2002:a05:600c:354d:b0:426:6eb6:1374 with SMTP id 5b1f17b1804b1-427f9944ef7mr12974385e9.0.1721820918520; Wed, 24 Jul 2024 04:35:18 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:7aef:1aaa:3dff:d546]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427f93a8095sm25044805e9.31.2024.07.24.04.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jul 2024 04:35:18 -0700 (PDT) From: luca.boccassi@gmail.com To: Zhichao Zeng Cc: Bruce Richardson , Song Jiale , dpdk stable Subject: patch 'net/ice/base: fix temporary failures reading NVM' has been queued to stable release 22.11.6 Date: Wed, 24 Jul 2024 12:33:14 +0100 Message-Id: <20240724113318.616754-36-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240724113318.616754-1-luca.boccassi@gmail.com> References: <20240715152704.2229503-86-luca.boccassi@gmail.com> <20240724113318.616754-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/15ac04a0680875a2798421672a3c327e86e84bb1 Thanks. Luca Boccassi --- >From 15ac04a0680875a2798421672a3c327e86e84bb1 Mon Sep 17 00:00:00 2001 From: Zhichao Zeng Date: Tue, 23 Jul 2024 14:19:15 +0800 Subject: [PATCH] net/ice/base: fix temporary failures reading NVM [ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ] Reading NVM fails in some scenarios, so follow the approach taken by kernel driver and add retries on read failures. Fixes: 2516684aed7a ("net/ice/base: extract logic of flat NVM read to function") Signed-off-by: Zhichao Zeng Reviewed-by: Bruce Richardson Tested-by: Song Jiale --- drivers/net/ice/base/ice_nvm.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/net/ice/base/ice_nvm.c b/drivers/net/ice/base/ice_nvm.c index bc1a74460c..6da52f4d58 100644 --- a/drivers/net/ice/base/ice_nvm.c +++ b/drivers/net/ice/base/ice_nvm.c @@ -72,6 +72,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, enum ice_status status; u32 inlen = *length; u32 bytes_read = 0; + int retry_cnt = 0; bool last_cmd; ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); @@ -106,11 +107,24 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, offset, (u16)read_size, data + bytes_read, last_cmd, read_shadow_ram, NULL); - if (status) - break; - - bytes_read += read_size; - offset += read_size; + if (status) { + if (hw->adminq.sq_last_status != ICE_AQ_RC_EBUSY || + retry_cnt > ICE_SQ_SEND_MAX_EXECUTE) + break; + ice_debug(hw, ICE_DBG_NVM, + "NVM read EBUSY error, retry %d\n", + retry_cnt + 1); + ice_release_nvm(hw); + msleep(ICE_SQ_SEND_DELAY_TIME_MS); + status = ice_acquire_nvm(hw, ICE_RES_READ); + if (status) + break; + retry_cnt++; + } else { + bytes_read += read_size; + offset += read_size; + retry_cnt = 0; + } } while (!last_cmd); *length = bytes_read; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-07-24 12:29:23.217366976 +0100 +++ 0036-net-ice-base-fix-temporary-failures-reading-NVM.patch 2024-07-24 12:29:20.815027016 +0100 @@ -1 +1 @@ -From 04de5c7d40b24ef391bd5b51be23994a6cfdd867 Mon Sep 17 00:00:00 2001 +From 15ac04a0680875a2798421672a3c327e86e84bb1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 04de5c7d40b24ef391bd5b51be23994a6cfdd867 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 528489929e..5e982de4b5 100644 +index bc1a74460c..6da52f4d58 100644 @@ -23,2 +24,2 @@ -@@ -71,6 +71,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, - { +@@ -72,6 +72,7 @@ ice_read_flat_nvm(struct ice_hw *hw, u32 offset, u32 *length, u8 *data, + enum ice_status status; @@ -29 +29,0 @@ - int status; @@ -30,0 +31 @@ + ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__);