From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8860AA00C5; Thu, 7 May 2020 05:19:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 588D61DA21; Thu, 7 May 2020 05:19:33 +0200 (CEST) Received: from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 89FDC1D9A7; Thu, 7 May 2020 05:19:31 +0200 (CEST) Received: from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net [10.75.242.48]) by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 6FB8630C025; Wed, 6 May 2020 20:18:51 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 6FB8630C025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1588821531; bh=XMiuoPJ2Jasb1ho8dhrh+/nkm937gLWconr6xX9AA+E=; h=From:To:Cc:Subject:Date:From; b=AebuATGczJwaFcQFUveo4T8ylpgAUsnpy9MachIxLPIfsYsF/XqsG8IqG3jba2zQ7 Jx9OS1VF3RB0HgIJN6Q2yE8h765iMKDTCQgsmEzRNANRKiZIBDJk6SwOyiBblfYeOV 5DTsWbPf2rELlwy5L2cD9swS4GwHeY10vpIA65FY= Received: from localhost.localdomain (unknown [10.230.26.175]) by mail-irv-17.broadcom.com (Postfix) with ESMTP id 0400214008B; Wed, 6 May 2020 20:19:22 -0700 (PDT) From: Ajit Khaparde To: dev@dpdk.org Cc: stable@dpdk.org Date: Wed, 6 May 2020 20:19:20 -0700 Message-Id: <20200507031920.47841-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/bnxt: fix FW version get X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" bnxt_fw_version_get is not indicating the complete FW version. Fix it to indicate complete version string. Fixes: e2652b0a20a0 ("net/bnxt: support get FW version") Cc: stable@dpdk.org Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index dab291c7c..ee0550b32 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2404,10 +2404,11 @@ bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size) uint8_t fw_major = (bp->fw_ver >> 24) & 0xff; uint8_t fw_minor = (bp->fw_ver >> 16) & 0xff; uint8_t fw_updt = (bp->fw_ver >> 8) & 0xff; + uint8_t fw_rsvd = bp->fw_ver & 0xff; int ret; - ret = snprintf(fw_version, fw_size, "%d.%d.%d", - fw_major, fw_minor, fw_updt); + ret = snprintf(fw_version, fw_size, "%d.%d.%d.%d", + fw_major, fw_minor, fw_updt, fw_rsvd); ret += 1; /* add the size of '\0' */ if (fw_size < (uint32_t)ret) -- 2.21.1 (Apple Git-122.3)