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 579C2A034C; Wed, 27 Apr 2022 16:59:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 662F14282E; Wed, 27 Apr 2022 16:58:46 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (lpdvsmtp11.broadcom.com [192.19.166.231]) by mails.dpdk.org (Postfix) with ESMTP id 6492A42829 for ; Wed, 27 Apr 2022 16:58:45 +0200 (CEST) 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 E446AC0000F2; Wed, 27 Apr 2022 07:58:43 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com E446AC0000F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1651071524; bh=KeS49yNd/QKreONz2c6Q+R+PDSg8gIf5D5s2ilBahaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pfrJymZl9YG3MVXJWEIEHoAc3O9MHCT6Wi/u+j3awXKwv271yUeKojt0hxdXVGTDO RF2Rhd9P0c0hCHKSMCtXOmH9FcpHnt4E0Y7beXnSHE+Qzw6FkK9yHQM2hu4N4OsQqP jh6hls5HdTGcCmAA0vGvADuYUNBB2kLx/iH7oflQ= From: Kalesh A P To: dev@dpdk.org Cc: ajit.khaparde@broadcom.com Subject: [PATCH 11/17] net/bnxt: avoid unnecessary endianness conversion Date: Wed, 27 Apr 2022 20:28:15 +0530 Message-Id: <20220427145821.5987-12-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20220427145821.5987-1-kalesh-anakkur.purayil@broadcom.com> References: <20220427145821.5987-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 The "active_fec_signal_mode" in HWRM_PORT_PHY_QCFG response is uint8_t. So no need of endianness conversion while parsing response. Also, signal_mode is the first 4bits of "active_fec_signal_mode". 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 178a112..d87f0c3 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -1506,7 +1506,7 @@ static int bnxt_hwrm_port_phy_qcfg(struct bnxt *bp, link_info->phy_ver[1] = resp->phy_min; link_info->phy_ver[2] = resp->phy_bld; link_info->link_signal_mode = - rte_le_to_cpu_16(resp->active_fec_signal_mode); + resp->active_fec_signal_mode & HWRM_PORT_PHY_QCFG_OUTPUT_SIGNAL_MODE_MASK; link_info->force_pam4_link_speed = rte_le_to_cpu_16(resp->force_pam4_link_speed); link_info->support_pam4_speeds = -- 2.10.1