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 E7989A0543 for ; Tue, 21 Jun 2022 10:07:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E081940151; Tue, 21 Jun 2022 10:07:24 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2078.outbound.protection.outlook.com [40.107.237.78]) by mails.dpdk.org (Postfix) with ESMTP id 356DC40151 for ; Tue, 21 Jun 2022 10:07:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cQjzgLHaNgvJ0CaW2ArWwQRKf7ltbmRu3EsoLTrHJPdDJdGmzvJJz57oBgwjPR77z1WU+DIaZlT84xT93F2r0MhBzdTc9g9aXjuXHr3IXUGOzuEvxTcULdvbe+Drvg68YK2tcvlVBuEteAV0aq9XfaR+yLwZhepkFIwXXUpnhmaqPCMWZkNBM/fmsOkfypOJNEgFgdwK+fY228P+82fdf5sgH8EKKYmVbRXSXZJBYZGPpKM+kYS9NCbWIW5wX+lzMvgS83m0bWIIc160b5+u3JO2AoQvXVzYrwuGkiu5r7fJYkt5mESvZtj/eulwltY8ZgZPJGSe75iGopnIHtAbvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1q63iqclB3G72OVdSPACqEmOgC2IoXvlCK5EHtA7y04=; b=I2S0ezzn9wcOhWtCdGzzShFBG+qAPAHRHmG1ioBy0Hso+TchgTysEf88M08sdVVoBrXHVof69AsCGtlsqUINi4oQlla/5y2kRG/bFd5nNoEzdlHC2Ito7XDxh7vc/itQ8JeNvzRPzE/kXAuZqvSpfrZ3TjwPooUavUGe4lv3JOlZwJ7j7+30QuOM5iCcmd2xSXg2UdMhMiMdtyVOY3QkBiomXxLyzEa8TPCHgJwPJb4I6WiaPv8evEPE4IXeHzW1Q3GWKcFKKAvzwJWl/EIGrRAz5xZXD7EbwrAfPbtcOo3zmg7By+yAQOFBuK2xu6ztcKROCZB4+EeZC/2LcT/dcA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1q63iqclB3G72OVdSPACqEmOgC2IoXvlCK5EHtA7y04=; b=ZhnEwNdb7cRjRtfRkCB5CG6Nn9gvy9i5L9eEM7XUa8y+OO/zEwHgw7bI8GIwFY/yuAHkPIr2tWZDA3idwhx5OOlLC0+LqAYC6MFu+DuDtgwZT05YhROPluwzN+VxiiQLVdaAqGaIw+1FNgBtGtqFTDh0cV49dBpv5fEsY7yUJW3PDmCad0AQ47QGG/q09fEINrlDCs7LTMUmaLqSZY2YHd04j5KfsU681COtiuic/eNs9SVUiXIN7vfTj8UHvyB/WeW1bqBjuko/bA7WHeAMXFQBN3LQeNqiWZ3b2Cwg7pjmqOq/EocPEyGA0PjQGGBrrgzWa0x65IorQ8NZoKyaeA== Received: from BN1PR10CA0021.namprd10.prod.outlook.com (2603:10b6:408:e0::26) by DM6PR12MB4747.namprd12.prod.outlook.com (2603:10b6:5:30::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16; Tue, 21 Jun 2022 08:07:21 +0000 Received: from BN8NAM11FT039.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e0:cafe::5b) by BN1PR10CA0021.outlook.office365.com (2603:10b6:408:e0::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.16 via Frontend Transport; Tue, 21 Jun 2022 08:07:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT039.mail.protection.outlook.com (10.13.177.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:07:19 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:07:18 +0000 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 21 Jun 2022 01:07:16 -0700 From: Xueming Li To: Kalesh AP CC: Ajit Khaparde , Somnath Kotur , dpdk stable Subject: patch 'net/bnxt: force PHY update on certain configurations' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:01:55 +0300 Message-ID: <20220621080301.2315720-50-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0c2a2c47-dbd7-4d48-9e1d-08da535d101f X-MS-TrafficTypeDiagnostic: DM6PR12MB4747:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ORWKRVD8ezDzZ8FwO85MpjQHbXelNM+FQlB+uVT7jDm5up4Mw0zRjP5pHCVX2OV6B0EgN0XWXnhpdybnalbyEQY5Z6s1EhlXn4RFwHNM1+79tol/0cYhv+Skwqdf/Sz907bKc2KRa/eespcfUr7ykMI6AT5HqrP/w0n1dIGPOHi5B9mzKyv43eN7vTBL5XCDAK2MYw8hxkRSaY9OZGTE1LYooJtCEUmWBwtx2qb+ixBpYZtE8Qa7TZipbXe+TkRZVdE6y7sIajIwOTbeK0+jK2+DutlOl56eCYTrFehOQMfY7cyfhbyu3Feu3Udd4Gn3EV5d6AXaqdJH8V3UykneGsezTqnbcagTDuer2gusYUuHCVExi2bQiYNb/XjuVuwZkiUW3BbfvjqGfvQIx+SPv2/qWstx2oFSKhkDh32LTK1QRq9qd2NJS2u7mSAFvrZ3x/V98rYi9Z9LI/0kX81yYga+HDFz/is7QrGr+nqtHGMwpZdRWiBeKaaJdGl9K7ePRi4CZdMhTLLbSbRjn0PUH340ahohsXMfzv6ZrYLZhqaKbKBCWitHHypC7+AEaWdGgyCenuXbpP3EFlWAdvlaX8YVeal36BR01AdOYlTg1ZO57neJ8McU6pK4kFmuDYrcdPGqwpozHtCj4WBWmxgCpd//2jfvomKZARyk3dsWtYp+E2aJ7KpmHvAbD9fY+AHG09HgLxGbkXZQjjlGlrbyc+F28/UFVLWRFaXcapIzK43MmvQ6dTOwu6QyP21KcKUcJzNaQfAjqhP30Ea5CnbtQRGqtppvzU0fc24GQOoU49JvDM9F26FZSqkx5YJ2dq0jnR4WWBzTYFSqPKfePMs5mSzs8UvpjhsCkrSh/nVKnoQ= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(346002)(396003)(39860400002)(136003)(376002)(36840700001)(46966006)(40470700004)(4326008)(86362001)(15650500001)(82310400005)(36756003)(8676002)(5660300002)(55016003)(40480700001)(8936002)(40460700003)(966005)(478600001)(70206006)(2906002)(54906003)(70586007)(316002)(6916009)(47076005)(186003)(426003)(1076003)(7696005)(26005)(53546011)(82740400003)(2616005)(41300700001)(336012)(83380400001)(6286002)(356005)(16526019)(81166007)(36860700001)(6666004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:07:19.2043 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c2a2c47-dbd7-4d48-9e1d-08da535d101f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT039.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4747 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/f5cee4b2cacf4f9b3435fd2591d70a341d3d43b6 Thanks. Xueming Li --- >From f5cee4b2cacf4f9b3435fd2591d70a341d3d43b6 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Wed, 27 Apr 2022 20:28:17 +0530 Subject: [PATCH] net/bnxt: force PHY update on certain configurations Cc: Xueming Li [ upstream commit 9c1410bed3d801a63c8c5b47d457a7f69e95e989 ] Device is not obliged link down in certain scenarios, even when forced. When FW does not allow any user other than the BMC to shutdown the port, bnxt_get_hwrm_link_config() call always returns link up. Force phy update always in that case, else user configuration for speed/autoneg would not get applied correctly. Fixes: 7bc8e9a227cc ("net/bnxt: support async link notification") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt.h | 3 +-- drivers/net/bnxt/bnxt_ethdev.c | 22 ++++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 61bb59feb6..0696b8a99d 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -82,8 +82,7 @@ #define BROADCOM_DEV_ID_58802_VF 0xd800 #define BROADCOM_DEV_957508_N2100 0x5208 -#define IS_BNXT_DEV_957508_N2100(bp) \ - ((bp)->pdev->id.subsystem_device_id == BROADCOM_DEV_957508_N2100) +#define BROADCOM_DEV_957414_N225 0x4145 #define BNXT_MAX_MTU 9574 #define VLAN_TAG_SIZE 4 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index fdcc73d432..742a020cae 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -670,6 +670,19 @@ static int bnxt_init_ctx_mem(struct bnxt *bp) return rc; } +static inline bool bnxt_force_link_config(struct bnxt *bp) +{ + uint16_t subsystem_device_id = bp->pdev->id.subsystem_device_id; + + switch (subsystem_device_id) { + case BROADCOM_DEV_957508_N2100: + case BROADCOM_DEV_957414_N225: + return true; + default: + return false; + } +} + static int bnxt_update_phy_setting(struct bnxt *bp) { struct rte_eth_link new; @@ -682,11 +695,12 @@ static int bnxt_update_phy_setting(struct bnxt *bp) } /* - * On BCM957508-N2100 adapters, FW will not allow any user other - * than BMC to shutdown the port. bnxt_get_hwrm_link_config() call - * always returns link up. Force phy update always in that case. + * Device is not obliged link down in certain scenarios, even + * when forced. When FW does not allow any user other than BMC + * to shutdown the port, bnxt_get_hwrm_link_config() call always + * returns link up. Force phy update always in that case. */ - if (!new.link_status || IS_BNXT_DEV_957508_N2100(bp)) { + if (!new.link_status || bnxt_force_link_config(bp)) { rc = bnxt_set_hwrm_link_config(bp, true); if (rc) { PMD_DRV_LOG(ERR, "Failed to update PHY settings\n"); -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:51.547524942 +0800 +++ 0049-net-bnxt-force-PHY-update-on-certain-configurations.patch 2022-06-21 15:37:49.064451347 +0800 @@ -1 +1 @@ -From 9c1410bed3d801a63c8c5b47d457a7f69e95e989 Mon Sep 17 00:00:00 2001 +From f5cee4b2cacf4f9b3435fd2591d70a341d3d43b6 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 9c1410bed3d801a63c8c5b47d457a7f69e95e989 ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index e4e8e8ecf8..e86e51e1fa 100644 +index 61bb59feb6..0696b8a99d 100644 @@ -28,2 +30,2 @@ -@@ -72,8 +72,7 @@ - #define BROADCOM_DEV_ID_58818_VF 0xd82e +@@ -82,8 +82,7 @@ + #define BROADCOM_DEV_ID_58802_VF 0xd800 @@ -37 +39 @@ - #define BNXT_NUM_VLANS 2 + #define VLAN_TAG_SIZE 4 @@ -39 +41 @@ -index 181de42d15..1904db93c4 100644 +index fdcc73d432..742a020cae 100644 @@ -42 +44 @@ -@@ -659,6 +659,19 @@ static int bnxt_init_ctx_mem(struct bnxt *bp) +@@ -670,6 +670,19 @@ static int bnxt_init_ctx_mem(struct bnxt *bp) @@ -62 +64 @@ -@@ -671,11 +684,12 @@ static int bnxt_update_phy_setting(struct bnxt *bp) +@@ -682,11 +695,12 @@ static int bnxt_update_phy_setting(struct bnxt *bp)