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 1AB92A0032 for ; Fri, 18 Feb 2022 13:41:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 15A5B40E28; Fri, 18 Feb 2022 13:41:17 +0100 (CET) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id 44DCF40141 for ; Fri, 18 Feb 2022 13:41:15 +0100 (CET) Received: by mail-wr1-f51.google.com with SMTP id x5so9526414wrg.13 for ; Fri, 18 Feb 2022 04:41:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ycl+vN0mtL4BPnR052LVgD7obDLivf8rgrVa+KuA1Iw=; b=LXQesR40c7O14uLMoSLY8WX5DHcD/i2ew8KZ/UJGL9cizeqNPpfjcx90MpiSYuJTTD lpCWTto2l0saWr1kXz57OFRrHpSsgB85a2ER3j+rfQmfl+FAR3LQtjzggmjfaLsqeNln AXdRnKfBQRnmYy8oqr3o8YXB4eAPJd9iNNBigDRtWp5Jqysy8HC6mFjJIZ+pCh+rWCMp Usvf4Zd9yKQ/qFGapCeYb35wzz3xPKH4pa8vRkye/OjwZW4rZIxDH3LlJTjv2ZDoLY8B mK1i/yw/ucp4K9j6JoMs844y29mVeZ7gBsQJd55zpmnwyJ+NIFJDKUQY5CcVWBCvYVA6 6sug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ycl+vN0mtL4BPnR052LVgD7obDLivf8rgrVa+KuA1Iw=; b=l0Ty7KKRIekK7hitZuvtti+38Eq6weEIo4/Uih/Qzq8xpdEE5tHLoRrYKyV9JdNxgT YaWNNW89067Etp50ONlpLQpVxlafa/tS8P8M8vFnybBWQKa1baxtzmPb7SBxtzgfoAAF nX5rTAJDIz83ZRRYi7KBOTY+EzQTiYrS17jeZdS+AU2YmYZlsBh3erGFPiw10bx6ifZv QzumtlPUHzrlc67TI74dg7x7WkED2STmjCWGPf8WLf/beqWqNVRNzaGDmUDlvftgW8V6 C6ZUm5CQyybpkKrq9z113K9X/TVt8NejAilbA19Kh9ZLTiH7PC0aCtCKFpj99tlq/91s lQ9w== X-Gm-Message-State: AOAM532XhxQGlJ6O+dzAs0GJCz1QcV/x9AANx3ptDtlmcVCiEMJFf7x0 8QnEiNUSGBWdNKTqCkCzE4PK8m3lCh/JVZT2 X-Google-Smtp-Source: ABdhPJzrpYGDvrEzjpuj28fk0WRt9YSI+8W253gD6sJb+LUS7QETZys01FgwCHNMsm0hEgToQvbYSg== X-Received: by 2002:a05:6000:1284:b0:1e4:a229:abb3 with SMTP id f4-20020a056000128400b001e4a229abb3mr5757666wrx.441.1645188074956; Fri, 18 Feb 2022 04:41:14 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id y6sm19813795wrd.30.2022.02.18.04.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:41:14 -0800 (PST) From: luca.boccassi@gmail.com To: Ajit Khaparde Cc: Kalesh AP , Somnath Kotur , dpdk stable Subject: patch 'net/bnxt: fix PAM4 mask setting' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:38:01 +0000 Message-Id: <20220218123931.1749595-32-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-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.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/52d79e82448b7b3fcec65a2184450f147ebd3b28 Thanks. Luca Boccassi --- >From 52d79e82448b7b3fcec65a2184450f147ebd3b28 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Tue, 4 Jan 2022 14:08:21 +0530 Subject: [PATCH] net/bnxt: fix PAM4 mask setting [ upstream commit 2ca072791715726cbb645b8d6ca0eb9734910c6b ] Set the PAM4 mask setting only when PAM4 signaling is enabled. Setting it otherwise seems to result in link negotiation. Also auto_pam4_link_speeds has been renamed to auto_pam4_link_speed_mask to reflect its real usage. Fixes: c23f9ded0391 ("net/bnxt: support 200G PAM4 link") Signed-off-by: Ajit Khaparde Reviewed-by: Kalesh AP Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt.h | 2 +- drivers/net/bnxt/bnxt_hwrm.c | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 51044d6241..b1ed54dd35 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -299,7 +299,7 @@ struct bnxt_link_info { uint8_t link_signal_mode; uint16_t force_pam4_link_speed; uint16_t support_pam4_speeds; - uint16_t auto_pam4_link_speeds; + uint16_t auto_pam4_link_speed_mask; uint16_t support_pam4_auto_speeds; uint8_t req_signal_mode; }; diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 225bcf0881..4dd98e6cad 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1303,16 +1303,17 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf) !(conf->phy_flags & HWRM_PORT_PHY_CFG_INPUT_FLAGS_FORCE)) { req.auto_mode = HWRM_PORT_PHY_CFG_INPUT_AUTO_MODE_SPEED_MASK; - req.auto_link_speed_mask = - conf->auto_link_speed_mask; - if (conf->auto_pam4_link_speeds) { + if (conf->auto_pam4_link_speed_mask && + bp->link_info->link_signal_mode) { enables |= HWRM_PORT_PHY_CFG_IN_EN_AUTO_PAM4_LINK_SPD_MASK; req.auto_link_pam4_speed_mask = - conf->auto_pam4_link_speeds; + rte_cpu_to_le_16(conf->auto_pam4_link_speed_mask); } else { enables |= HWRM_PORT_PHY_CFG_IN_EN_AUTO_LINK_SPEED_MASK; + req.auto_link_speed_mask = + rte_cpu_to_le_16(conf->auto_link_speed_mask); } } if (conf->auto_link_speed && @@ -1385,7 +1386,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, rte_le_to_cpu_16(resp->force_pam4_link_speed); link_info->support_pam4_speeds = rte_le_to_cpu_16(resp->support_pam4_speeds); - link_info->auto_pam4_link_speeds = + link_info->auto_pam4_link_speed_mask = rte_le_to_cpu_16(resp->auto_pam4_link_speed_mask); HWRM_UNLOCK(); @@ -1395,7 +1396,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, link_info->support_speeds, link_info->force_link_speed); PMD_DRV_LOG(DEBUG, "Link Signal:%d,PAM::Auto:%x,Support:%x,Force:%x\n", link_info->link_signal_mode, - link_info->auto_pam4_link_speeds, + link_info->auto_pam4_link_speed_mask, link_info->support_pam4_speeds, link_info->force_pam4_link_speed); return rc; @@ -3137,7 +3138,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) /* No auto speeds and no auto_pam4_link. Disable autoneg */ if (bp->link_info->auto_link_speed == 0 && bp->link_info->link_signal_mode && - bp->link_info->auto_pam4_link_speeds == 0) + bp->link_info->auto_pam4_link_speed_mask == 0) autoneg = 0; speed = bnxt_parse_eth_link_speed(dev_conf->link_speeds, @@ -3150,8 +3151,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) link_req.auto_link_speed_mask = bnxt_parse_eth_link_speed_mask(bp, dev_conf->link_speeds); - link_req.auto_pam4_link_speeds = - bp->link_info->auto_pam4_link_speeds; + link_req.auto_pam4_link_speed_mask = + bp->link_info->auto_pam4_link_speed_mask; } else { if (bp->link_info->phy_type == HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASET || @@ -3170,9 +3171,9 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) else if (bp->link_info->force_pam4_link_speed) link_req.link_speed = bp->link_info->force_pam4_link_speed; - else if (bp->link_info->auto_pam4_link_speeds) + else if (bp->link_info->auto_pam4_link_speed_mask) link_req.link_speed = - bp->link_info->auto_pam4_link_speeds; + bp->link_info->auto_pam4_link_speed_mask; else if (bp->link_info->support_pam4_speeds) link_req.link_speed = bp->link_info->support_pam4_speeds; @@ -3184,7 +3185,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) * zero. Use the auto_link_speed. */ if (bp->link_info->auto_link_speed != 0 && - bp->link_info->auto_pam4_link_speeds == 0) + bp->link_info->auto_pam4_link_speed_mask == 0) link_req.link_speed = bp->link_info->auto_link_speed; } link_req.duplex = bnxt_parse_eth_link_duplex(dev_conf->link_speeds); -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:39.369987405 +0000 +++ 0032-net-bnxt-fix-PAM4-mask-setting.patch 2022-02-18 12:37:37.618790312 +0000 @@ -1 +1 @@ -From 2ca072791715726cbb645b8d6ca0eb9734910c6b Mon Sep 17 00:00:00 2001 +From 52d79e82448b7b3fcec65a2184450f147ebd3b28 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 2ca072791715726cbb645b8d6ca0eb9734910c6b ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 9c0dbc6af4..433f1c80be 100644 +index 51044d6241..b1ed54dd35 100644 @@ -26 +27 @@ -@@ -297,7 +297,7 @@ struct bnxt_link_info { +@@ -299,7 +299,7 @@ struct bnxt_link_info { @@ -34 +35 @@ - uint8_t module_status; + }; @@ -36 +37 @@ -index b8c0cf50ad..5850e7e48b 100644 +index 225bcf0881..4dd98e6cad 100644 @@ -39 +40 @@ -@@ -1436,16 +1436,17 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf) +@@ -1303,16 +1303,17 @@ static int bnxt_hwrm_port_phy_cfg(struct bnxt *bp, struct bnxt_link_info *conf) @@ -61 +62 @@ -@@ -1518,7 +1519,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, +@@ -1385,7 +1386,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, @@ -68 +68,0 @@ - link_info->module_status = resp->module_status; @@ -70 +70,2 @@ -@@ -1529,7 +1530,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, + +@@ -1395,7 +1396,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, @@ -79 +80 @@ -@@ -3245,7 +3246,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) +@@ -3137,7 +3138,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) @@ -88 +89 @@ -@@ -3258,8 +3259,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) +@@ -3150,8 +3151,8 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) @@ -99 +100 @@ -@@ -3278,9 +3279,9 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) +@@ -3170,9 +3171,9 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) @@ -111 +112 @@ -@@ -3292,7 +3293,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up) +@@ -3184,7 +3185,7 @@ int bnxt_set_hwrm_link_config(struct bnxt *bp, bool link_up)