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 1874E4624E for ; Mon, 17 Feb 2025 18:07:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 140E1402D5; Mon, 17 Feb 2025 18:07:33 +0100 (CET) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id E951A402D5 for ; Mon, 17 Feb 2025 18:07:31 +0100 (CET) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-38f504f087eso26679f8f.1 for ; Mon, 17 Feb 2025 09:07:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739812051; x=1740416851; 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=pFZgT8FgA8EsWna3Vkspgt0/iA4/mxISQ3hX71g55cA=; b=hzwxNzF6Yauhmt2qslZHnOOEiZNk7AFjxXVaLho6UavNtHf1oCm5gQhV0nTf4no7bI mgjgCrQFoeaXOZ6vQGCCaU+Brt93HEm4JLtLLB6YC9jetvAHx9pzO9A7oVj6BnFoP7UA wc3jNehAVLO4kQfOjZhZ0hNbeOGS4UxCk0QkX/7YXYuw9MjbwfMGARFIqzuy7nFSLi/0 lK5C/czzeiATzypjQZ9IU+xpOsF12W0UNyMvoBTstqkvgN6WgYIwBvzGSQyvZSR4khLi gTkA/PhdkFhvajycZWoL+Bk1Du4wdpX5Wt10OGo6kaXpvXfEfobdBVoDfs1xvhL5e1Fa 18lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739812051; x=1740416851; 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=pFZgT8FgA8EsWna3Vkspgt0/iA4/mxISQ3hX71g55cA=; b=t7Y4o78e+bo1cax/iSZhR9QoDZRIu55dj7JfTxPmPZDac+7OmApN3XS5qVddTecO4C 0V6wQxE9ivahgSK27x0RfV+7LjO1jivxNLsz/7Z4nrBOdICGbXiEc5acxJtqgx1FSWlx EfBp+eU4wtd5UXxEvMnUTH+SmHKIN9bHXUWNhQn97lD0/Y8b+pdM3sYDOy0wa0J8IsEk +GH8nwFyx8//dYpiQWEe6p2MNxfUt6co9ByWPv80o5U3ZS8SXLEUVSa8uEHFdvq8xAoU 9zUNFeKHf67QeYrx+1HccqL3F1CCxCMdzj1ktAZvJAOWA9//0uFBN0UlnosGNIr/Zhpt 6DZw== X-Forwarded-Encrypted: i=1; AJvYcCWd38A+WMGn2MkcL11CLOg2lNiaeIifoJKlVerRrj/bkZjOswvPLUBDmzdZX3G9f8cZQUjxziE=@dpdk.org X-Gm-Message-State: AOJu0YytkKO6Z7VkoJlzIWUc/cgi4dMWdIaxZX64BehDiuR9ZXmX58BE Owy8O1xtO93GWWyjxr+8nXTKSZJXhl2ng2+3+9iTsRe9y99uwa9Y X-Gm-Gg: ASbGncunGcbEdOCyWSSGDs9gzc2ki7BSICrSYl/9RSlQ+RG4whVY4ClAoU3fdpn9RO4 iopQf+wDnHjKGOhd8LK4lF894fz0hLcpapmjurR/+Pa8OsA5ojcwXV/jCBEHJBCaJ9ZK7EtCLum TQ8IE8N1eUsXmtriOLr1K9VNCdxJ0vRHhvo++x9Xa6GTG9JWDLaU5CS7br6LF0+xuTNAjPh3nDE GVOnRMrnvBfuDM2wh/S631/x29g2B6IrUJDsmkYNXCJCv8C0pEwByoWYi/92YSAmokpJbfB12qP 4MbN9ILDv3cVWvDv4ropGw== X-Google-Smtp-Source: AGHT+IFlUg9gyWPN6zpaRhxSbTz8llpj81kIs+V/BK+7numN6UIHpFB3ERrvfWzctQbbyiUpusmByw== X-Received: by 2002:a05:6000:18a9:b0:38d:deb4:4ee8 with SMTP id ffacd0b85a97d-38f33f2f8d3mr11276215f8f.28.1739812051438; Mon, 17 Feb 2025 09:07:31 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-38f259d8f1csm12912039f8f.69.2025.02.17.09.07.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:07:30 -0800 (PST) From: luca.boccassi@gmail.com To: Anatoly Burakov Cc: Bruce Richardson , dpdk stable Subject: patch 'net/e1000/base: correct mPHY access logic' has been queued to stable release 22.11.8 Date: Mon, 17 Feb 2025 17:04:21 +0000 Message-ID: <20250217170456.1068278-48-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/7a0f1f4122a5e8c18e5771319e1e9e26473549cd Thanks. Luca Boccassi --- >From 7a0f1f4122a5e8c18e5771319e1e9e26473549cd Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Thu, 6 Feb 2025 16:08:38 +0000 Subject: [PATCH] net/e1000/base: correct mPHY access logic [ upstream commit 62adddef81d4ddb9789e9f0e5a0899b399bd5d8d ] The original code had incorrect indentation, and the fix was applied to follow the indentation, i.e. adding brackets making the indentation valid. However, the actual issue was incorrect indentation and not missing braces, so the fix was incorrect. This fix restores the original logic and corrects indentation. Fixes: d5e39d1ca460 ("net/e1000/base: fix build with gcc 6") Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- drivers/net/e1000/base/e1000_phy.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c index 62d0be5080..208fb3f81b 100644 --- a/drivers/net/e1000/base/e1000_phy.c +++ b/drivers/net/e1000/base/e1000_phy.c @@ -4134,13 +4134,12 @@ s32 e1000_read_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 *data) *data = E1000_READ_REG(hw, E1000_MPHY_DATA); /* Disable access to mPHY if it was originally disabled */ - if (locked) { + if (locked) ready = e1000_is_mphy_ready(hw); - if (!ready) - return -E1000_ERR_PHY; - E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, - E1000_MPHY_DIS_ACCESS); - } + if (!ready) + return -E1000_ERR_PHY; + E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, + E1000_MPHY_DIS_ACCESS); return E1000_SUCCESS; } @@ -4200,13 +4199,12 @@ s32 e1000_write_phy_reg_mphy(struct e1000_hw *hw, u32 address, u32 data, E1000_WRITE_REG(hw, E1000_MPHY_DATA, data); /* Disable access to mPHY if it was originally disabled */ - if (locked) { + if (locked) ready = e1000_is_mphy_ready(hw); - if (!ready) - return -E1000_ERR_PHY; - E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, - E1000_MPHY_DIS_ACCESS); - } + if (!ready) + return -E1000_ERR_PHY; + E1000_WRITE_REG(hw, E1000_MPHY_ADDR_CTRL, + E1000_MPHY_DIS_ACCESS); return E1000_SUCCESS; } -- 2.47.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-17 16:13:18.557415192 +0000 +++ 0048-net-e1000-base-correct-mPHY-access-logic.patch 2025-02-17 16:13:16.846441592 +0000 @@ -1 +1 @@ -From 62adddef81d4ddb9789e9f0e5a0899b399bd5d8d Mon Sep 17 00:00:00 2001 +From 7a0f1f4122a5e8c18e5771319e1e9e26473549cd Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 62adddef81d4ddb9789e9f0e5a0899b399bd5d8d ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ - drivers/net/intel/e1000/base/e1000_phy.c | 22 ++++++++++------------ + drivers/net/e1000/base/e1000_phy.c | 22 ++++++++++------------ @@ -22 +23 @@ -diff --git a/drivers/net/intel/e1000/base/e1000_phy.c b/drivers/net/intel/e1000/base/e1000_phy.c +diff --git a/drivers/net/e1000/base/e1000_phy.c b/drivers/net/e1000/base/e1000_phy.c @@ -24,2 +25,2 @@ ---- a/drivers/net/intel/e1000/base/e1000_phy.c -+++ b/drivers/net/intel/e1000/base/e1000_phy.c +--- a/drivers/net/e1000/base/e1000_phy.c ++++ b/drivers/net/e1000/base/e1000_phy.c