From patchwork Sun Sep 5 18:10:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 507311 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 E24F5C433F5 for ; Sun, 5 Sep 2021 18:11:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6B2D60EE6 for ; Sun, 5 Sep 2021 18:11:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238057AbhIESMa (ORCPT ); Sun, 5 Sep 2021 14:12:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbhIESM3 (ORCPT ); Sun, 5 Sep 2021 14:12:29 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2128C061575 for ; Sun, 5 Sep 2021 11:11:25 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id q68so4393010pga.9 for ; Sun, 05 Sep 2021 11:11:25 -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=Fj5mtpZe88Wwv5VgWgIi8D3QpGXwYNdx03aAkT0VBOA=; b=U/B/zq9TMjG0VBfUOmam99WKBE/+koPgxc+5h2Ix5PryH7Xc33fruZYeiYhpVEbzHE eQLF+RRijPAj00tu6p3mCrzaLD9lntBCSiCNgaejWOs9y7snPp2xPVjPqFPzMleOcJls +FqH3gFR35qwD/IXN+54L6+YGs9SpBZZI71Q4= 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=Fj5mtpZe88Wwv5VgWgIi8D3QpGXwYNdx03aAkT0VBOA=; b=Y6H630VeM8Ibj6mSr54tGmUAlDaRvix1iUWuFhZmQbipLNSN9LL1mPtwF+I7ESN8pb 3fTiOWR1at7q+naFDofjjAzjBDemQXIgjp8/vySXEHlLZiedFQ0VqXu9dSJ+6EqlV1QY 6dPzUrUjJHPTMM5F/p5Y3MevCnydHQTUPBrNMpiU2G1IzC/Py7mtPDHjErznrDshL8+n ZZyYudzynnqNcfv8ZMeVBCl3ieCoCp6UnHavSWr8/peCGaLQqMBZmzxpiZJJCkniX4W6 svzUKS8ef9ruzVrC+Hgy17e9U5j4Lv+KcjEhLn0a9wVuRZRhx/V1cCeIUCNtUjo8uVHs Zg7g== X-Gm-Message-State: AOAM533Cd0Psb9vRp2Sb7mmzlnfs462/A6nT+jRs/iNESdL5ABdCT4Hq WOTFSDzUeCSy4LeaXb5mkIbasw== X-Google-Smtp-Source: ABdhPJzyEWhlgsDijRu+zxkuulp4BumXd/ZP8Vu5GXv/YQkbKzy0eyvqnedFLW0h5o/KWJqCgUmglg== X-Received: by 2002:aa7:8097:0:b029:3cd:b205:cfe9 with SMTP id v23-20020aa780970000b02903cdb205cfe9mr8283172pff.1.1630865484837; Sun, 05 Sep 2021 11:11:24 -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.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 Sep 2021 11:11:24 -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 1/5] bnxt_en: fix stored FW_PSID version masks Date: Sun, 5 Sep 2021 14:10:55 -0400 Message-Id: <1630865459-19146-2-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 From: Edwin Peer The FW_PSID version components are 8 bits wide, not 4. Fixes: db28b6c77f40 ("bnxt_en: Fix devlink info's stored fw.psid version format.") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c index 1423cc617d93..01c21d75f4d4 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -478,8 +478,8 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req, if (BNXT_PF(bp) && !bnxt_hwrm_get_nvm_cfg_ver(bp, &nvm_cfg_ver)) { u32 ver = nvm_cfg_ver.vu32; - sprintf(buf, "%d.%d.%d", (ver >> 16) & 0xf, (ver >> 8) & 0xf, - ver & 0xf); + sprintf(buf, "%d.%d.%d", (ver >> 16) & 0xff, (ver >> 8) & 0xff, + ver & 0xff); rc = bnxt_dl_info_put(bp, req, BNXT_VERSION_STORED, DEVLINK_INFO_VERSION_GENERIC_FW_PSID, buf);