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 2CE49A0C4C for ; Mon, 12 Jul 2021 15:14:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21C6C40685; Mon, 12 Jul 2021 15:14:42 +0200 (CEST) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mails.dpdk.org (Postfix) with ESMTP id B11A940685 for ; Mon, 12 Jul 2021 15:14:40 +0200 (CEST) Received: by mail-wm1-f52.google.com with SMTP id l6so3100544wmq.0 for ; Mon, 12 Jul 2021 06:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sLogpz439/sCJlPhLQd264zOgerPSgQ8/SmzmaKd7TI=; b=umvVLvzzO5k6jOlu+QkzpuGpzzcKUOXOWm0p2TIvQP0RKkKbounbFgi0CViwVnuOs3 dOk5RKzc5MXOBs9aZmmIFW2HoJSB608ulyJxxby4XuFB2zSERJR2vcpgjnVqveW7sMEw e5zNFqmjTqMWsByXq6Cz+Me+6FQOZV0R+DTXD9Xc/VV598vXoLFUBZf0AruuseHyFfcq qH0OCdnsjxqJ2jbMmUtQWxWuyz7i4ivpc1P2dLO3vg+Xd/JQX40YyG8KkYHSjhwUafGW 3IMe3GiaSgvNWPqr+CgeIDyx0W0wm3BJRZ+Wnvji4JLGXf1dzpczW1/0fsnL8hjYzZ1o InXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sLogpz439/sCJlPhLQd264zOgerPSgQ8/SmzmaKd7TI=; b=qd2M1rFtk+KQxUExarOLFmWWGqdpgOCC8YYDh97eUKVpKnl7Hw7JAtsC3WC9czd6ML +JEHcBNIjqzWI0U8gmiEwXcwCPIkze92udspKNzv01wYa3VqbG2WySh1RjbzribgbIjF cHNhWrI9GI3VapenIiK2mPQBcKw0o6GMv1TDkFlr/jWznPSWOmKGWhC7Q40lsqVcoBNL AWEKPwVqIQwSbAMAujbON39Uyml3FnsG/cTnVjKbeayWImLxT1j6GJZ/FA63ehhmFoYx JzTgAW5YF16rOkhWrVc/KgkvEEGzcgs9j0fdX6jCgFzJS4CAaVMIIoXVZkqTY0PuG70Z 6DXg== X-Gm-Message-State: AOAM531S9aP9W5k9RZAl4xdrOrKR6UgvHOwRmropEbG3SaC0ycB5pjIS cWaIv6SYbvl4f3sW0BVmEIs= X-Google-Smtp-Source: ABdhPJzMxnqO5ikuB5Tm2RdoE9YrjeQneMhYh9WHvNDwQ3ePgLWsI255u/uy98mCVXAnq+dkOafNGA== X-Received: by 2002:a05:600c:4f41:: with SMTP id m1mr55759599wmq.134.1626095680538; Mon, 12 Jul 2021 06:14:40 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id t9sm13885882wrq.92.2021.07.12.06.14.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:14:40 -0700 (PDT) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Somnath Kotur , Ajit Khaparde , dpdk stable Date: Mon, 12 Jul 2021 14:05:21 +0100 Message-Id: <20210712130551.2462159-86-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix auto-negociation on Whitney+' has been queued to stable release 20.11.3 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.3 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/14/21. 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/271e43d4e14c9c33a9ff4f7cd90768528f0146d8 Thanks. Luca Boccassi --- >From 271e43d4e14c9c33a9ff4f7cd90768528f0146d8 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Wed, 9 Jun 2021 08:43:31 +0530 Subject: [PATCH] net/bnxt: fix auto-negociation on Whitney+ [ upstream commit 70c7d4184cb9a32ab6c65ce67ce5fbe3a5be5294 ] Driver should enable autoneg on a port if FW supports it. Because of a wrong check, driver is not enabling autoneg on a port after setting forced speed on Whitney+. Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification") Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_hwrm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 6af7e62721..ea61fcf74b 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1363,6 +1363,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, link_info->support_speeds = rte_le_to_cpu_16(resp->support_speeds); link_info->auto_link_speed = rte_le_to_cpu_16(resp->auto_link_speed); + link_info->auto_link_speed_mask = rte_le_to_cpu_16(resp->auto_link_speed_mask); link_info->preemphasis = rte_le_to_cpu_32(resp->preemphasis); link_info->force_link_speed = rte_le_to_cpu_16(resp->force_link_speed); link_info->phy_ver[0] = resp->phy_maj; @@ -1416,6 +1417,12 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp) HWRM_UNLOCK(); + /* Older firmware does not have supported_auto_speeds, so assume + * that all supported speeds can be autonegotiated. + */ + if (link_info->auto_link_speed_mask && !link_info->support_auto_speeds) + link_info->support_auto_speeds = link_info->support_speeds; + return 0; } @@ -3085,15 +3092,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) speed = bnxt_parse_eth_link_speed(dev_conf->link_speeds, bp->link_info->link_signal_mode); link_req.phy_flags = HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESET_PHY; - /* Autoneg can be done only when the FW allows. - * When user configures fixed speed of 40G and later changes to - * any other speed, auto_link_speed/force_link_speed is still set - * to 40G until link comes up at new speed. - */ - if (autoneg == 1 && - !(!BNXT_CHIP_THOR(bp) && - (bp->link_info->auto_link_speed || - bp->link_info->force_link_speed))) { + /* Autoneg can be done only when the FW allows. */ + if (autoneg == 1 && bp->link_info->support_auto_speeds) { link_req.phy_flags |= HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG; link_req.auto_link_speed_mask = -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:41.061543281 +0100 +++ 0086-net-bnxt-fix-auto-negociation-on-Whitney.patch 2021-07-12 13:41:36.730127610 +0100 @@ -1 +1 @@ -From 70c7d4184cb9a32ab6c65ce67ce5fbe3a5be5294 Mon Sep 17 00:00:00 2001 +From 271e43d4e14c9c33a9ff4f7cd90768528f0146d8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 70c7d4184cb9a32ab6c65ce67ce5fbe3a5be5294 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 13c2b88104..a251d39fa1 100644 +index 6af7e62721..ea61fcf74b 100644 @@ -24 +25 @@ -@@ -1495,6 +1495,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, +@@ -1363,6 +1363,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, @@ -32 +33 @@ -@@ -1549,6 +1550,12 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp) +@@ -1416,6 +1417,12 @@ int bnxt_hwrm_port_phy_qcaps(struct bnxt *bp) @@ -45 +46 @@ -@@ -3249,15 +3256,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) +@@ -3085,15 +3092,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) @@ -55 +56 @@ -- !(!BNXT_CHIP_P5(bp) && +- !(!BNXT_CHIP_THOR(bp) &&