From patchwork Sun Sep 5 18:10:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 507310 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY, SPF_HELO_NONE, SPF_PASS, T_TVD_MIME_NO_HEADERS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD5A5C433F5 for ; Sun, 5 Sep 2021 18:11:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADA8A60F5B for ; Sun, 5 Sep 2021 18:11:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238114AbhIESMi (ORCPT ); Sun, 5 Sep 2021 14:12:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238112AbhIESMg (ORCPT ); Sun, 5 Sep 2021 14:12:36 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70270C0613C1 for ; Sun, 5 Sep 2021 11:11:32 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id i13so2888377pjv.5 for ; Sun, 05 Sep 2021 11:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1X/NmGjbwTh3m0JJv07UyzNDXqUCUnf1x3RH1bjIMBs=; b=fn9C31ZzaSptIW1y9t/vnYgD61hUuU2RVGqaQwaSasySroQYNSI5D6flszJTP+e+7p Dt3VpOdLSGRRW4KSbWXTgwWfF5/O70yHkadOEd4HdN679KEg9/Ck2PCbEYnpJmyZluy6 KRTghQBT4PYDMI0ou/6o0OVpM4EC1aUDYe3kc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1X/NmGjbwTh3m0JJv07UyzNDXqUCUnf1x3RH1bjIMBs=; b=JSWb4+WCj0tUOgscCkC+Hy8+4Gh2V3XfnVqAXpzutMhaq7yGS1lMq8l/s7FSYvhyNb OQEAOyFFaH+OBTPWM93jCl7K4ILOREvm4uGCc2X1+rljnWDytyq52WqJXsfM3BQHjjH7 mfengQ4gQZ2XlIMI7rh2tijp1iY7/KDL1t2LArhU0CrtLMl+W4jJu+BmEdcAjCsQV52O SPiGB9zQwuHlRvF43pMjPOIJI/j/jumTJ+2EYok09P3jVZ86KYAOICp4jRBZGfmpu97v NnjNAYb7e7g+K8IeF9+DkL+fCaGWJ44cNN8Mjgfx143bGFr8HE0muNkX72DgsmBEbUag pRBw== X-Gm-Message-State: AOAM532d1c1x7weRaR+aVWMLvhmj0RnNPWxls4t5OfjAsgJwG3mwyzSa ui3en9ib0UVW/cwQ0ii9CKW4WQ== X-Google-Smtp-Source: ABdhPJxh1d0PKBD4XiXG8taQjvsD5D8H06yYrfIdGJnPn2IIFWodqDD8B4nJZkSuYmCaTvZzs5M6Yg== X-Received: by 2002:a17:902:7e4d:b0:13a:8f:42d4 with SMTP id a13-20020a1709027e4d00b0013a008f42d4mr7769665pln.62.1630865491640; Sun, 05 Sep 2021 11:11:31 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d13sm5058115pfn.114.2021.09.05.11.11.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Sep 2021 11:11:31 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, edwin.peer@broadcom.com, gospo@broadcom.com Subject: [PATCH net 3/5] bnxt_en: Fix asic.rev in devlink dev info command Date: Sun, 5 Sep 2021 14:10:57 -0400 Message-Id: <1630865459-19146-4-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1630865459-19146-1-git-send-email-michael.chan@broadcom.com> References: <1630865459-19146-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The current asic.rev is incomplete and does not include the metal revision. Add the metal revision and decode the complete asic revision into the more common and readable form (A0, B0, etc). Fixes: 7154917a12b2 ("bnxt_en: Refactor bnxt_dl_info_get().") Reviewed-by: Edwin Peer Reviewed-by: Somnath Kotur Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c index cb20e627282a..9576547df4ab 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -477,7 +477,7 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req, return rc; ver_resp = &bp->ver_resp; - sprintf(buf, "%X", ver_resp->chip_rev); + sprintf(buf, "%c%d", 'A' + ver_resp->chip_rev, ver_resp->chip_metal); rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_FIXED, DEVLINK_INFO_VERSION_GENERIC_ASIC_REV, buf); if (rc)