Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2353935pxb; Mon, 20 Sep 2021 19:52:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKk9Mlb9J+aH8vHnYg3M+lAQNnrikV/A28p8+mkwooD2H7eb/AeKTKE1CpDbE+fzdNNYYs X-Received: by 2002:a17:906:700f:: with SMTP id n15mr31413304ejj.319.1632192771874; Mon, 20 Sep 2021 19:52:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192771; cv=none; d=google.com; s=arc-20160816; b=z8SJji/7xE3fhwBrEa1i5ktFAOkXUAjekrPv4gykx1p2uWhNVU9Uv8cB2csk6H3Mrk cnQB/dXsw6bdH5F68diRiEchKpIFvglPbPO5BlqKTCqZS721fekakiYKD4+vxeBwv8X+ GOI7gXaND59GGRkS97aB4XFqeXo2jBKaaSjMH2GEFQeMkIPvJv/T7QdalNnocICdosfo kfUfbS2HnTXJB/7GFnF8nYuZja26uVEH2hUd+oLohQSV6B7JTfeDVqqO9LL+TCnrHmL0 xXvO2bqbxT1PhxobWbJoIeeRyiLZ+p2WXyUkC8RmP06wnkzT+drxlu0sPpE6kzhjdlCn uWig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0mPskuL2kV/I+KTNj6Cgb/MKB5lErNlangjUpWNccpY=; b=Mz65xpfxlNBOq0TL0Hx10NVsTxhQdPUBEuboGvORFkX/RIo+Mre7H8URm0y6TG2QsT EXTmOgeGfxpIyMbNpfVRgnxjMs9M4zkX2gA0ka6xtCn/f8XgiwVv2TfIla9YVyB1hWvl 8tRNl9gcKMiW/xgRR9ZOn7qJ173EgPecko56e7t721pIAeDvZ1VVID1D5ENOuKMw+Z9D tdj8BwGPsHghClkdxvI+1OTRoJ1jnT0PqADDrlayhUynL78aZX1B+66dsP4bjx1imIMm IKdsBbxcZDUBrF75+iMFXvii2M/RY+uunRYIVULER861iyTUn8OWAKr8C70PcIFZbIko +IUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ng63V6w3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jy20si18013476ejc.27.2021.09.20.19.52.28; Mon, 20 Sep 2021 19:52:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ng63V6w3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385969AbhITSw5 (ORCPT + 99 others); Mon, 20 Sep 2021 14:52:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:33380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1385496AbhITSua (ORCPT ); Mon, 20 Sep 2021 14:50:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6058F63378; Mon, 20 Sep 2021 17:34:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159291; bh=8/yye/4zvPjG7kAcdR5+Vg31xWD23JRkZxSAEoaWl68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ng63V6w33py0Tnh+1mnImFbwjLN+ulBUAFrN7o+jbrkZot5zlm59CiG9mKIgQ6Sfi pi3pfXmpBb1PNqUKgMJN89Y8Ndx8H+A2lFoz4yZ7oY2CSseSBtaSKOhabzpMC7vyby XDbapMI9ctVHqD0XpHqii4CZUF7vNJFvtYJ63088= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Edwin Peer , Somnath Kotur , Michael Chan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.14 163/168] bnxt_en: Fix asic.rev in devlink dev info command Date: Mon, 20 Sep 2021 18:45:01 +0200 Message-Id: <20210920163927.029982361@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Chan [ Upstream commit 6fdab8a3ade2adc123bbf5c4fdec3394560b1fb1 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 8b7f6a0ad401..bb228619ec64 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -449,7 +449,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) -- 2.30.2