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 A2D67A0555 for ; Wed, 25 May 2022 18:30:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9C1B2400EF; Wed, 25 May 2022 18:30:12 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 3D21F400EF for ; Wed, 25 May 2022 18:30:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653496210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VJWbddNw/M8OGMIsseILwSJFe9pvvrlfJ36ykKfyUWI=; b=K+5ikRQqUZQ4F3O5CzvWJIVNdyA5APzvLRNmQn1n0ZzLMVoxBCmIfRGTSe7UYApFueRsNx fJ+SxqY+s27GzfJ92ppBOA/lbTd0ptY9+vYyl6QX0b6kExcskue9BLU7xmxxViQhV/mMw8 sobvMh3AWTR773vTLamw3H9oppINH8M= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-622-72PHkrXKMEOJz6qUzcQmIw-1; Wed, 25 May 2022 12:30:06 -0400 X-MC-Unique: 72PHkrXKMEOJz6qUzcQmIw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 59F573C1173A; Wed, 25 May 2022 16:30:06 +0000 (UTC) Received: from rh.Home (unknown [10.39.193.216]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25CAE2026D64; Wed, 25 May 2022 16:30:04 +0000 (UTC) From: Kevin Traynor 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 21.11.2 Date: Wed, 25 May 2022 17:28:38 +0100 Message-Id: <20220525162847.711753-46-ktraynor@redhat.com> In-Reply-To: <20220525162847.711753-1-ktraynor@redhat.com> References: <20220525162847.711753-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/30/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/71ab79d3a7b646ef1ef8644a1e4b39e5aac30d79 Thanks. Kevin --- >From 71ab79d3a7b646ef1ef8644a1e4b39e5aac30d79 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 [ 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 b5dcc72568..83d23abce7 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -73,6 +73,5 @@ #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 diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index afe54b1e25..89506e9ef1 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -660,4 +660,17 @@ static int bnxt_init_ctx_mem(struct bnxt *bp) } +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) { @@ -672,9 +685,10 @@ 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) { -- 2.34.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-05-25 17:26:59.649363397 +0100 +++ 0046-net-bnxt-force-PHY-update-on-certain-configurations.patch 2022-05-25 17:26:58.641828440 +0100 @@ -1 +1 @@ -From 9c1410bed3d801a63c8c5b47d457a7f69e95e989 Mon Sep 17 00:00:00 2001 +From 71ab79d3a7b646ef1ef8644a1e4b39e5aac30d79 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9c1410bed3d801a63c8c5b47d457a7f69e95e989 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index e4e8e8ecf8..e86e51e1fa 100644 +index b5dcc72568..83d23abce7 100644 @@ -37 +38 @@ -index 181de42d15..1904db93c4 100644 +index afe54b1e25..89506e9ef1 100644