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 E846AA00C3; Thu, 20 Jan 2022 09:53:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A4DC3426D7; Thu, 20 Jan 2022 09:53:27 +0100 (CET) Received: from relay.smtp-ext.broadcom.com (lpdvsmtp11.broadcom.com [192.19.166.231]) by mails.dpdk.org (Postfix) with ESMTP id DB070426D3 for ; Thu, 20 Jan 2022 09:53:24 +0100 (CET) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id 2E9F0C000C76; Thu, 20 Jan 2022 00:53:22 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 2E9F0C000C76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1642668804; bh=JNNzITHIn8RxPO5+tgkI8UQEK78yG+Zc8ThTUeb1Tco=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TUavR3mAqHJpuJq5J2bOmxjsyTx5TPwsWo397Qhl24FqRESyyR9+0TPz5NQL0oTXH 9fWRn1Jb1ZR2gct86TsyJ84a0BMTZ6od3eqFl3MrPmGpS/6Yxgd8ps3Opy87rXPy9P G3a5JHSaEcFxilYTNOaEInyBtGjAr5Iz4cWHdgNo= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Subject: [dpdk-dev] [PATCH 1/4] net/bnxt: fix check for autoneg enablement Date: Thu, 20 Jan 2022 14:42:25 +0530 Message-Id: <20220120091228.7076-2-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20220120091228.7076-1-kalesh-anakkur.purayil@broadcom.com> References: <20220120091228.7076-1-kalesh-anakkur.purayil@broadcom.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Kalesh AP HWRM_PORT_PHY_QCFG_OUTPUT response indicates the autoneg speed mask supported by the FW. While enabling autoneg, driver should also check the FW advertised PAM4 speeds supported in auto mode which is set in the HWRM_PORT_PHY_QCFG_OUTPUT response. Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_hwrm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 5850e7e..5418fa1 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -3253,7 +3253,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) 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. */ - if (autoneg == 1 && bp->link_info->support_auto_speeds) { + if (autoneg == 1 && + (bp->link_info->support_auto_speeds || bp->link_info->support_pam4_auto_speeds)) { link_req.phy_flags |= HWRM_PORT_PHY_CFG_INPUT_FLAGS_RESTART_AUTONEG; link_req.auto_link_speed_mask = -- 2.10.1