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 E11144624E for ; Mon, 17 Feb 2025 18:07:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC63F402AB; Mon, 17 Feb 2025 18:07:31 +0100 (CET) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mails.dpdk.org (Postfix) with ESMTP id B93E4402AB for ; Mon, 17 Feb 2025 18:07:30 +0100 (CET) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-43932b9b09aso50478325e9.3 for ; Mon, 17 Feb 2025 09:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739812050; x=1740416850; 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=8FBbbRKGMSkXzkH+1J5wwUx0qgQhSmjG8FZmGHSZAJc=; b=J5J1SR1mlawFtLaEYRVjfx0A8/djQsW3xwUEjqs4BFB2gJsihXHIHsrMZXtmAGffjR +MmXvBM9loQy0aP/2+EI3Ym4UhoixhFvhi2gLhU+piZz1/CLsUexnZReGZM416S1RV38 NkTqljEruAnMEEWMSadew25RyNBDkhF5fxB0L1meU3H3umelChkxLRtJNowUIC1E0Mfz CnPLOOiQTIxTOfnHLO4fRscJPEcv23PLrgIjJb5pngMrintee4JOqwJyinEOGl0SneVv ZIVtTL/bAI5I67Dw/q/jIZr+CfrvGObrh3R+O8nOJOCIGoBiDp0W/6o/hfS7nNrzm1cl ++9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739812050; x=1740416850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :sub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received: by 2002:a05:600c:1d23:b0:439:45ce:15da with SMTP id 5b1f17b1804b1-4396e72ff6cmr80112785e9.25.1739812050214; Mon, 17 Feb 2025 09:07:30 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-43989087517sm23937085e9.8.2025.02.17.09.07.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:07:29 -0800 (PST) From: luca.boccassi@gmail.com To: Pawel Malinowski Cc: Anatoly Burakov , Bruce Richardson , dpdk stable Subject: patch 'net/e1000/base: fix semaphore timeout value' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:20 +0000 Message-ID: <20250217170456.1068278-47-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-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.8 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/25. 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/0fa84eb740cb48d4bacaac01d909fd4786ff8f86 Thanks. Luca Boccassi --- >From 0fa84eb740cb48d4bacaac01d909fd4786ff8f86 Mon Sep 17 00:00:00 2001 From: Pawel Malinowski Date: Thu, 6 Feb 2025 16:08:37 +0000 Subject: [PATCH] net/e1000/base: fix semaphore timeout value [ upstream commit c8bcaf0f2a02995b447c121e860fd550b9c55114 ] According to datasheet, software ownership of SWSM.SWESMBI bit should not exceed 100ms. Current implementation caused incorrect timeout counter values, where each iteration equals 50us delay. Because of that driver was allowed to wait for semaphore even for 1.5s. This might trigger DPC timeout. This implementation hardcodes value to 2000, which multiplied by 50us, gives 100ms of possible wait time. Fixes: af75078fece3 ("first public release") Signed-off-by: Pawel Malinowski Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- drivers/net/e1000/base/e1000_defines.h | 1 + drivers/net/e1000/base/e1000_mac.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h index 3fbb6c8ea4..97cc2797b2 100644 --- a/drivers/net/e1000/base/e1000_defines.h +++ b/drivers/net/e1000/base/e1000_defines.h @@ -504,6 +504,7 @@ /* SW Semaphore Register */ #define E1000_SWSM_SMBI 0x00000001 /* Driver Semaphore bit */ #define E1000_SWSM_SWESMBI 0x00000002 /* FW Semaphore bit */ +#define E1000_SWSM_TIMEOUT 2000 /* Driver Semaphore max timeout counter */ #define E1000_SWSM_DRV_LOAD 0x00000008 /* Driver Loaded Bit */ #define E1000_SWSM2_LOCK 0x00000002 /* Secondary driver semaphore bit */ diff --git a/drivers/net/e1000/base/e1000_mac.c b/drivers/net/e1000/base/e1000_mac.c index d3b3a6bac9..cf0a9f21e1 100644 --- a/drivers/net/e1000/base/e1000_mac.c +++ b/drivers/net/e1000/base/e1000_mac.c @@ -1688,7 +1688,7 @@ s32 e1000_get_speed_and_duplex_fiber_serdes_generic(struct e1000_hw E1000_UNUSED s32 e1000_get_hw_semaphore_generic(struct e1000_hw *hw) { u32 swsm; - s32 timeout = hw->nvm.word_size + 1; + s32 timeout = E1000_SWSM_TIMEOUT; s32 i = 0; DEBUGFUNC("e1000_get_hw_semaphore_generic"); -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:18.524496095 +0000 +++ 0047-net-e1000-base-fix-semaphore-timeout-value.patch 2025-02-17 16:13:16.846441592 +0000 @@ -1 +1 @@ -From c8bcaf0f2a02995b447c121e860fd550b9c55114 Mon Sep 17 00:00:00 2001 +From 0fa84eb740cb48d4bacaac01d909fd4786ff8f86 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c8bcaf0f2a02995b447c121e860fd550b9c55114 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -22,2 +23,2 @@ - drivers/net/intel/e1000/base/e1000_defines.h | 1 + - drivers/net/intel/e1000/base/e1000_mac.c | 2 +- + drivers/net/e1000/base/e1000_defines.h | 1 + + drivers/net/e1000/base/e1000_mac.c | 2 +- @@ -26 +27 @@ -diff --git a/drivers/net/intel/e1000/base/e1000_defines.h b/drivers/net/intel/e1000/base/e1000_defines.h +diff --git a/drivers/net/e1000/base/e1000_defines.h b/drivers/net/e1000/base/e1000_defines.h @@ -28,2 +29,2 @@ ---- a/drivers/net/intel/e1000/base/e1000_defines.h -+++ b/drivers/net/intel/e1000/base/e1000_defines.h +--- a/drivers/net/e1000/base/e1000_defines.h ++++ b/drivers/net/e1000/base/e1000_defines.h @@ -38 +39 @@ -diff --git a/drivers/net/intel/e1000/base/e1000_mac.c b/drivers/net/intel/e1000/base/e1000_mac.c +diff --git a/drivers/net/e1000/base/e1000_mac.c b/drivers/net/e1000/base/e1000_mac.c @@ -40,2 +41,2 @@ ---- a/drivers/net/intel/e1000/base/e1000_mac.c -+++ b/drivers/net/intel/e1000/base/e1000_mac.c +--- a/drivers/net/e1000/base/e1000_mac.c ++++ b/drivers/net/e1000/base/e1000_mac.c