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 BC4B3A00C2 for ; Thu, 3 Nov 2022 10:29:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B833E4114E; Thu, 3 Nov 2022 10:29:57 +0100 (CET) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mails.dpdk.org (Postfix) with ESMTP id 9BF2C4114E for ; Thu, 3 Nov 2022 10:29:56 +0100 (CET) Received: by mail-wr1-f47.google.com with SMTP id bs21so1730377wrb.4 for ; Thu, 03 Nov 2022 02:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=JnJGGFxxO51GqxJkWarv+U4lsAZ3AZ8YRv0t0kBE5F8=; b=K5TEa+59aOQh+g2KFfcYZ7gkFBKUVLu3jN3I600dZOufVrDdkQ1+61YnSkh7IHT4m4 66mUXpZSCOMyIIdqLdBPBeTY8yKzTmhDFmBsuWPLv50fqY9muyFOSSTLGhk7Non+tWUa EhHA4xtkP1hlEOtMZv0Yh0iLuSV/h8naYLY/1Y+bGfTwk5SLj3vnGWs9raK1FvQOZ0pC dKkPLGiuaCwxucpYs7cjVNqU3vO8WDZUyXZdniM1+iNA8iTkieCx8ZEKGfbjxymEAJEz YJ676UsOW3aG2N0TTOOQRWI6CTvWFOicxRj1hjRE2xlPj5k3a3LouitZ9N6Icy6BOIYS ON0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=JnJGGFxxO51GqxJkWarv+U4lsAZ3AZ8YRv0t0kBE5F8=; b=Sj4auAIvI4X1vGMqQ43sIH0F7akekHAChm0cEinEXeARshBHGB2BWvsImpOE5h1u1p u07VezA4mzvITeFJPgc58BOjCUrOn/mY5f/zTa0t5yp32sNZxqp2AzNYyoG2lHpT1Zyd 08E45gTuMyn6gY/su6yNtjjXXm8fHRKdnP2mAVzkCZWNcHEwkXY3T5Dw75Ta6PMaD157 aUgGbL2wF6HdmlOuE3C8ioF2PAzepQMSt3ni6J3KEsjkTm6/i6GkJKzzhn3HS2unIb/b qq6TbdEgQkMQRqY0SWxdC5KUnaYrYWKw9d3EiRGA1xr3YgxCVLd+zIDreS1/m5JLohRJ uLHw== X-Gm-Message-State: ACrzQf0xVUO+XGlVnYbWRr9BufLAdKDA7E59ozzmWNOEJ062zOrVnOyP uzrAEu8hAvYhvRyfSZvsyxt/g4Hn4GZK3xqp X-Google-Smtp-Source: AMsMyM4IrmEWZLK2h2HMhcHws9DEzGm4yWkTfOEhQ/iefZMv8jfin2ve2ct5UfxXHLYfv7hdxpru+Q== X-Received: by 2002:adf:b612:0:b0:236:5d1f:143a with SMTP id f18-20020adfb612000000b002365d1f143amr17461596wre.364.1667467796311; Thu, 03 Nov 2022 02:29:56 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id j20-20020adfb314000000b002258235bda3sm350923wrd.61.2022.11.03.02.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:29:55 -0700 (PDT) From: luca.boccassi@gmail.com To: Mah Yock Gen Cc: Taripin Samuel , Qi Zhang , dpdk stable Subject: patch 'net/igc: remove unnecessary PHY ID checks' has been queued to stable release 20.11.7 Date: Thu, 3 Nov 2022 09:26:51 +0000 Message-Id: <20221103092758.1099402-33-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-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 20.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/05/22. 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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/05e2b4507c90f452a03d20d022ebfb0750acea9a Thanks. Luca Boccassi --- >From 05e2b4507c90f452a03d20d022ebfb0750acea9a Mon Sep 17 00:00:00 2001 From: Mah Yock Gen Date: Fri, 2 Sep 2022 08:18:28 +0800 Subject: [PATCH] net/igc: remove unnecessary PHY ID checks [ upstream commit 4841015ffbe59b59e790559a04fc76ae8569e6f4 ] I225 devices have only one PHY vendor. There is unnecessary to check _I_PHY_ID during the link establishment and auto-negotiation process, the checking also caused devices like i225-IT failed. This patch is to remove the mentioned unnecessary checking. Signed-off-by: Mah Yock Gen Signed-off-by: Taripin Samuel Acked-by: Qi Zhang --- drivers/net/igc/base/igc_i225.c | 14 ++------------ drivers/net/igc/base/igc_phy.c | 6 ++---- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/drivers/net/igc/base/igc_i225.c b/drivers/net/igc/base/igc_i225.c index 060b2f8f93..180d3cf687 100644 --- a/drivers/net/igc/base/igc_i225.c +++ b/drivers/net/igc/base/igc_i225.c @@ -173,18 +173,8 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw) phy->ops.write_reg = igc_write_phy_reg_gpy; ret_val = igc_get_phy_id(hw); - /* Verify phy id and set remaining function pointers */ - switch (phy->id) { - case I225_I_PHY_ID: - phy->type = igc_phy_i225; - phy->ops.set_d0_lplu_state = igc_set_d0_lplu_state_i225; - phy->ops.set_d3_lplu_state = igc_set_d3_lplu_state_i225; - /* TODO - complete with GPY PHY information */ - break; - default: - ret_val = -IGC_ERR_PHY; - goto out; - } + phy->type = igc_phy_i225; + out: return ret_val; diff --git a/drivers/net/igc/base/igc_phy.c b/drivers/net/igc/base/igc_phy.c index 43bbe69bca..2906bae21a 100644 --- a/drivers/net/igc/base/igc_phy.c +++ b/drivers/net/igc/base/igc_phy.c @@ -1474,8 +1474,7 @@ s32 igc_phy_setup_autoneg(struct igc_hw *hw) return ret_val; } - if ((phy->autoneg_mask & ADVERTISE_2500_FULL) && - hw->phy.id == I225_I_PHY_ID) { + if (phy->autoneg_mask & ADVERTISE_2500_FULL) { /* Read the MULTI GBT AN Control Register - reg 7.32 */ ret_val = phy->ops.read_reg(hw, (STANDARD_AN_REG_MASK << MMD_DEVADDR_SHIFT) | @@ -1615,8 +1614,7 @@ s32 igc_phy_setup_autoneg(struct igc_hw *hw) ret_val = phy->ops.write_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg); - if ((phy->autoneg_mask & ADVERTISE_2500_FULL) && - hw->phy.id == I225_I_PHY_ID) + if (phy->autoneg_mask & ADVERTISE_2500_FULL) ret_val = phy->ops.write_reg(hw, (STANDARD_AN_REG_MASK << MMD_DEVADDR_SHIFT) | -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-11-03 09:27:27.416657721 +0000 +++ 0033-net-igc-remove-unnecessary-PHY-ID-checks.patch 2022-11-03 09:27:25.381422595 +0000 @@ -1 +1 @@ -From 4841015ffbe59b59e790559a04fc76ae8569e6f4 Mon Sep 17 00:00:00 2001 +From 05e2b4507c90f452a03d20d022ebfb0750acea9a Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4841015ffbe59b59e790559a04fc76ae8569e6f4 ] + @@ -11,2 +12,0 @@ -Cc: stable@dpdk.org - @@ -17 +17 @@ - drivers/net/igc/base/igc_i225.c | 15 ++------------- + drivers/net/igc/base/igc_i225.c | 14 ++------------ @@ -19 +19 @@ - 2 files changed, 4 insertions(+), 17 deletions(-) + 2 files changed, 4 insertions(+), 16 deletions(-) @@ -22 +22 @@ -index 5f3d535490..180d3cf687 100644 +index 060b2f8f93..180d3cf687 100644 @@ -25 +25 @@ -@@ -173,19 +173,8 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw) +@@ -173,18 +173,8 @@ static s32 igc_init_phy_params_i225(struct igc_hw *hw) @@ -32 +31,0 @@ -- case I226_LM_PHY_ID: