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 B6B3B45D5D for ; Thu, 21 Nov 2024 00:42:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9333A40296; Thu, 21 Nov 2024 00:42:49 +0100 (CET) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by mails.dpdk.org (Postfix) with ESMTP id 9C3AF4327C for ; Thu, 21 Nov 2024 00:42:46 +0100 (CET) Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-4314f38d274so3116705e9.1 for ; Wed, 20 Nov 2024 15:42:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732146166; x=1732750966; 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=/q0AZsxFGv3qjpWh2Bf3GbOAIG5bwHjqQWKLeRVTEPU=; b=mus1lCtiSWjrNQzq44E00ymS+Tu6THLOtazRc06+M7wQdESBzz4SXkvnyusxEC1QH0 dSKn6A/ri62PVr1Jr15VeZwzikaOJbvtpWt6udojosm8BePKpsVI2NkS8LERXvEwe+W+ WuGsWcUEHG001mT/SNZZXDTBQoiOC8Bjt/zJdup4lks27jWqbnAF+wWhiubFG4link9G GAB4Z9Gmg1WvKEUgjdfgvss+RDJhWnRYWonNS74SvROmGcsU8x9eIvdE8/Yx05uTrlk3 l6zQoMFEGo8Yb3I+iVP8GDgeRz1YsIQeLvCcRytxQ37uYG7Lfha1W8hS0Wo4U5agc+J1 zfsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732146166; x=1732750966; 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=/q0AZsxFGv3qjpWh2Bf3GbOAIG5bwHjqQWKLeRVTEPU=; b=aVFb3EPieZMV20vWPuhc0uHcoOkZJrqCp7gJPbneoHl+3HJeEhx3AquHWNsD7IM+Oz Xv/X09qjHtcOLHIZIPxzSRHI89bZrInWe5Gf+Jdy0o8edrryXqd6QEDgwUJUSYgQXp// 75YUqeLJThi8d2JQO30FXBvLPd6ztxZFw8ZH1ykkpg5M6aS+E+YYeow3oHIywmx/qZG6 crJmU40pQxBGS6yFEf1QhexDq1qOUtoDLyGz3BLIFYZZMmitbShwdwwtZY9UCxGf3qbu HxieuXtYtK9wmlIZ4rUsHAZEfT/LtAs17gB5QmZvQcgAtPDbJ7bYVg9Oz2zVAx5gOC9H eBDQ== X-Gm-Message-State: AOJu0Yx+uPYEaxHjVmjXGeEIaxrW/qneL+pjS/WWIG64UsaYApcX+8Sl ZKgBTpYOz2EUPlOcoL9cByxpHj5bmT2yyX3V3m8xWcaUOVFPyY0b X-Google-Smtp-Source: AGHT+IEoKVaYDsEK1WnXPKgPBgBJF7DUBBV74J6xaOn7gYnxNFlCYyfYmvuAyEpE39Q0cfJ0fv3KAA== X-Received: by 2002:a05:600c:a01:b0:431:59b2:f0c4 with SMTP id 5b1f17b1804b1-433489a02f2mr47537205e9.8.1732146165974; Wed, 20 Nov 2024 15:42:45 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b4617563sm34569105e9.25.2024.11.20.15.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 15:42:45 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: dpdk stable Subject: patch 'net/bnx2x: fix possible infinite loop at startup' has been queued to stable release 22.11.7 Date: Wed, 20 Nov 2024 23:41:33 +0000 Message-ID: <20241120234215.233355-8-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241120234215.233355-1-luca.boccassi@gmail.com> References: <20241112220754.666489-40-luca.boccassi@gmail.com> <20241120234215.233355-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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/22/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/0ff8ac46bab033dd2366f450366cff20b2b9d4c4 Thanks. Luca Boccassi --- >From 0ff8ac46bab033dd2366f450366cff20b2b9d4c4 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 12 Nov 2024 09:43:55 -0800 Subject: [PATCH] net/bnx2x: fix possible infinite loop at startup [ upstream commit a47272b052dd1c8c571a1c0b89b56aaa3ebf4351 ] Coverity spotted that one of the loop conditions was always true. Fix by initializing the variable using same logic as Linux kernel driver. Coverity issue: 362057 Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Stephen Hemminger --- drivers/net/bnx2x/bnx2x.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c index 8e6d2c5c80..a93642650a 100644 --- a/drivers/net/bnx2x/bnx2x.c +++ b/drivers/net/bnx2x/bnx2x.c @@ -10337,12 +10337,13 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc) REG_WR(sc, PXP2_REG_RD_DISABLE_INPUTS, 0); if (!CHIP_IS_E1x(sc)) { - int factor = 0; + int factor = CHIP_REV_IS_EMUL(sc) ? 1000 : + (CHIP_REV_IS_FPGA(sc) ? 400 : 0); ecore_init_block(sc, BLOCK_PGLUE_B, PHASE_COMMON); ecore_init_block(sc, BLOCK_ATC, PHASE_COMMON); -/* let the HW do it's magic... */ + /* let the HW do it's magic... */ do { DELAY(200000); val = REG_RD(sc, ATC_REG_ATC_INIT_DONE); -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-20 23:41:23.015527193 +0000 +++ 0008-net-bnx2x-fix-possible-infinite-loop-at-startup.patch 2024-11-20 23:41:22.700195467 +0000 @@ -1 +1 @@ -From a47272b052dd1c8c571a1c0b89b56aaa3ebf4351 Mon Sep 17 00:00:00 2001 +From 0ff8ac46bab033dd2366f450366cff20b2b9d4c4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a47272b052dd1c8c571a1c0b89b56aaa3ebf4351 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index af31ac4604..d96fcb55c9 100644 +index 8e6d2c5c80..a93642650a 100644 @@ -23 +24 @@ -@@ -10331,12 +10331,13 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc) +@@ -10337,12 +10337,13 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)