From patchwork Thu Mar 26 12:02:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasundhara Volam X-Patchwork-Id: 221802 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 9EFDFC43331 for ; Thu, 26 Mar 2020 12:04:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 73FB920714 for ; Thu, 26 Mar 2020 12:04:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="b8R1O805" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728200AbgCZMEi (ORCPT ); Thu, 26 Mar 2020 08:04:38 -0400 Received: from mail-wr1-f42.google.com ([209.85.221.42]:44668 "EHLO mail-wr1-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727841AbgCZMEi (ORCPT ); Thu, 26 Mar 2020 08:04:38 -0400 Received: by mail-wr1-f42.google.com with SMTP id m17so7390994wrw.11 for ; Thu, 26 Mar 2020 05:04:36 -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=VuRbPNlCIMP3t93wAWjdG1iK3phauZwFNn810BiXTrw=; b=b8R1O805nRMgXgQg45uiRE8y0lVtva0VFEW6rlsQPIwqCBJ5o6hYmIY8u1UVCr1fEG TYZxvy+BdKQ75RiMfQuE//Z3jVxsR0oDd6caF81eGCdAlVyK1ryPUSHGa0CWLVAx/jzT V6G5vRN31NIbDoqW8sUriJPo2siHrlGKOKzcs= 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=VuRbPNlCIMP3t93wAWjdG1iK3phauZwFNn810BiXTrw=; b=KEnfEn8hapfW75wB3XKnPXRr2jGsgVfsLi5Z2BOHivirvcQMTLj2td429UBWHkMdqD J4z+3gYfZEcvvbjcF56utwK8pSibwkkMEz+liQ6rbX5cey2gnikVVlWqaSwsFc+eTy1W x6oWV7WLtXLXlmdeN9ThqA5AyXVgoddEhkqd4t8b/A7wBvRnGESS9eEiI601wjYG2yDW 7kOiHfjqxJIdbAaeXWFFLUYqloYpIEH9UpRU8eY5DUFzxlkvmAExAsiQ3Zl4keddoxkA y1zks9Mk0UshvKVs+JMCO8YD9F4oftro7qrrXxqjRwfNR2kzNRw+rkUwB3dXO585KY4b FRtQ== X-Gm-Message-State: ANhLgQ2QlgQ0HbY5qp31eqwJizjFP8uaJpACVS9apBEjSomebeoGs8pn kGCGDquf/X1T4Iq40yE7oQwm0A== X-Google-Smtp-Source: ADFU+vuBJ7/AU+L/vIvxT8tGu1NghXxcXjmOUB6QC1tZ03PmSdqYJ9lm8IM69cbH2lb1GlXPPTLlbg== X-Received: by 2002:adf:c651:: with SMTP id u17mr9491673wrg.40.1585224275896; Thu, 26 Mar 2020 05:04:35 -0700 (PDT) Received: from lxpurley1.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id k84sm3316637wmk.2.2020.03.26.05.04.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2020 05:04:35 -0700 (PDT) From: Vasundhara Volam To: davem@davemloft.net Cc: netdev@vger.kernel.org, Vasundhara Volam , Jakub Kicinski , Jacob Keller , Michael Chan Subject: [PATCH v3 net-next 1/5] devlink: Add macro for "fw.api" to info_get cb. Date: Thu, 26 Mar 2020 17:32:34 +0530 Message-Id: <1585224155-11612-2-git-send-email-vasundhara-v.volam@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1585224155-11612-1-git-send-email-vasundhara-v.volam@broadcom.com> References: <1585224155-11612-1-git-send-email-vasundhara-v.volam@broadcom.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add definition and documentation for the new generic info "fw.api". "fw.api" specifies the version of the software interfaces between driver and overall firmware. Cc: Jakub Kicinski Cc: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- v1->v2: Rename macro to "fw.api" from "drv.spec". --- Documentation/networking/devlink/devlink-info.rst | 6 ++++++ include/net/devlink.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Documentation/networking/devlink/devlink-info.rst b/Documentation/networking/devlink/devlink-info.rst index e5e5e89..650e2c0e3 100644 --- a/Documentation/networking/devlink/devlink-info.rst +++ b/Documentation/networking/devlink/devlink-info.rst @@ -150,6 +150,12 @@ fw Overall firmware version, often representing the collection of fw.mgmt, fw.app, etc. +fw.api +------ + +Overall firmware interface specification version of the software interfaces +between driver and firmware. + fw.mgmt ------- diff --git a/include/net/devlink.h b/include/net/devlink.h index 37230e2..d51482f 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -478,6 +478,8 @@ enum devlink_param_generic_id { /* Overall FW version */ #define DEVLINK_INFO_VERSION_GENERIC_FW "fw" +/* Overall FW interface specification version */ +#define DEVLINK_INFO_VERSION_GENERIC_FW_API "fw.api" /* Control processor FW version */ #define DEVLINK_INFO_VERSION_GENERIC_FW_MGMT "fw.mgmt" /* Data path microcode controlling high-speed packet processing */ From patchwork Thu Mar 26 12:03:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasundhara Volam X-Patchwork-Id: 221801 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 25D75C43331 for ; Thu, 26 Mar 2020 12:04:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E34C920714 for ; Thu, 26 Mar 2020 12:04:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Q8ZNzEZV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728224AbgCZME5 (ORCPT ); Thu, 26 Mar 2020 08:04:57 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:44727 "EHLO mail-wr1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727841AbgCZME5 (ORCPT ); Thu, 26 Mar 2020 08:04:57 -0400 Received: by mail-wr1-f50.google.com with SMTP id m17so7392337wrw.11 for ; Thu, 26 Mar 2020 05:04:56 -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; bh=hlrOdL1KnO3xQYV3oaqWV4hvkH1Bg456h/MxyKV3WFw=; b=Q8ZNzEZVj4ArJZlQsTgtY9lOUnlyrjbwDCPmwhCzy/kdC558hxZTevND6O0OgNGkJS OnTFBIt67m9AxzuozNxFFR7z4Jc0ZvygewWGgTZ4jkfSlHybK0BrXtYYFwDhogXZQwZ+ 85bvI73TElLPMHddpnggqt5NFZ3A0hmP1cw2M= 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; bh=hlrOdL1KnO3xQYV3oaqWV4hvkH1Bg456h/MxyKV3WFw=; b=s+0uQVLBgYEUQXOl1cA3+PBePqzzwIbsZoTtwgwflQkcidD2q9awMWjh+csZTPgcpP YnW44gU2q1E6vTKkt8TBuCmF+RBzfTXB7NiLYrPT5clK6AUYZghY/EJPY9sc7wbk6apm IXrnHONz13CTMdHK0QbBuLhWyFMsv/IulTSUjU6cGpiikEfmhW4/WqGARKrZDB1vRxgT ySRF1+JdnhvRpD3gNNJmURaKZ1Q/PEUcOFKS0N3liAn8uQNfcqmbRvu5C9+IKeQsKbfD 8erJ30g3U6FfZBgGRVXFapO2jQ3I1I/IO5tHkVfAH0nx51+l75jtGxg1jFnhF//+wEyc 2zbQ== X-Gm-Message-State: ANhLgQ2I1tepML5ewrGEdS4knbK4AH3qgfcivHBsJ8UtuZxB+34C9TEv QdnDlzC3lpkxqvwAMvBgc5w2OA== X-Google-Smtp-Source: ADFU+vsVbQ4V97PRcWPdmYDtrRV3SMhggAZwTyXthYHZNz2Np81nIX+ln0eeRDTXutm8RL6olkccvg== X-Received: by 2002:adf:b6a5:: with SMTP id j37mr9041267wre.412.1585224295334; Thu, 26 Mar 2020 05:04:55 -0700 (PDT) Received: from lxpurley1.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id w9sm3660279wrk.18.2020.03.26.05.04.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2020 05:04:53 -0700 (PDT) From: Vasundhara Volam To: linux-pci@vger.kernel.org, davem@davemloft.net Cc: netdev@vger.kernel.org, Vasundhara Volam , Michael Chan Subject: [PATCH v3 net-next 3/5] PCI: Add new PCI_VPD_RO_KEYWORD_SERIALNO macro Date: Thu, 26 Mar 2020 17:33:11 +0530 Message-Id: <1585224191-11920-1-git-send-email-vasundhara-v.volam@broadcom.com> X-Mailer: git-send-email 1.8.3.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch adds a new macro for serial number keyword. Acked-by: Bjorn Helgaas Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- include/linux/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/pci.h b/include/linux/pci.h index fc54b89..a048fba 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2184,6 +2184,7 @@ bool pci_acs_path_enabled(struct pci_dev *start, #define PCI_VPD_INFO_FLD_HDR_SIZE 3 #define PCI_VPD_RO_KEYWORD_PARTNO "PN" +#define PCI_VPD_RO_KEYWORD_SERIALNO "SN" #define PCI_VPD_RO_KEYWORD_MFR_ID "MN" #define PCI_VPD_RO_KEYWORD_VENDOR0 "V0" #define PCI_VPD_RO_KEYWORD_CHKSUM "RV" From patchwork Thu Mar 26 12:03:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasundhara Volam X-Patchwork-Id: 221800 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=-8.2 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLACK, 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 31AEDC43331 for ; Thu, 26 Mar 2020 12:05:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 07E8620714 for ; Thu, 26 Mar 2020 12:05:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="OBNRNRK2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728245AbgCZMFR (ORCPT ); Thu, 26 Mar 2020 08:05:17 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38381 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728001AbgCZMFR (ORCPT ); Thu, 26 Mar 2020 08:05:17 -0400 Received: by mail-wm1-f65.google.com with SMTP id f6so109438wmj.3 for ; Thu, 26 Mar 2020 05:05:15 -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=VqeDlpwv1p4TqztAbL3WzSCThKYMNm+IpDoCwea6pPo=; b=OBNRNRK25AtAI/hbq6vYdTW/KhmrN3wVWpGVmo9J0vh7oZW3cmA10G7c5SaGxHTKuP h7lzhv2yet+zlFu6268AMqIxNkD3Dvm8lqOxfbl9w/oi24nXC6rfuCzELf0/MA7axMnU CqDAWdYRISnzK37VMbPdSa/aV/ppQaBaoIqcI= 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=VqeDlpwv1p4TqztAbL3WzSCThKYMNm+IpDoCwea6pPo=; b=QReVHlL5ds5pNmOJXao7RWxSAi0tEuLdBkyUXFxbEpg1eto7xZPS2VuNUzePUqdWbq Kaxf7QcwMRAVCXdxvN/YC0dh268ddVKFyNXyc7NbitN0zPXQtoPdzQO0e2ROkaMTrQv6 jdSfG7iIF1dnylTnmqJgXAKvPsUXNSmnH68ebIDi6DyKI+su0/ZhuQ5pxmVA5yzP2hWt 4ffW/9ljUQHygnP8fcNAPtwnaPWqgokdro/bJCYFV6He0LtAGaOVvEvi4diepj1FHno7 Hu3HJNlIZB6JKeou3XGjah4P7eom9CNGV2ZQEW8FuXq0wrNdf/T7d1/O7mvATOW8BIwC OTvg== X-Gm-Message-State: ANhLgQ0/X2nBAZ0zO1/6TCC1p0c2XU4+viTjDECDa80iWSWuIzPfqp0v VsFYm1+SeutwJDGHXDte+pQDTuyLvgU= X-Google-Smtp-Source: ADFU+vthDvMokaZnM3M5WswRU9VnLU4oOSpJ0/z8F7zkPYTCcWFBvocZK4QajApx0sZ/Z3VpKuoUNQ== X-Received: by 2002:a1c:41d6:: with SMTP id o205mr2776225wma.122.1585224314836; Thu, 26 Mar 2020 05:05:14 -0700 (PDT) Received: from lxpurley1.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id t2sm3108969wml.30.2020.03.26.05.05.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2020 05:05:14 -0700 (PDT) From: Vasundhara Volam To: davem@davemloft.net Cc: netdev@vger.kernel.org, Vasundhara Volam , Jakub Kicinski , Michael Chan Subject: [PATCH v3 net-next 5/5] bnxt_en: Add partno to devlink info_get cb Date: Thu, 26 Mar 2020 17:33:25 +0530 Message-Id: <1585224205-11966-2-git-send-email-vasundhara-v.volam@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1585224205-11966-1-git-send-email-vasundhara-v.volam@broadcom.com> References: <1585224205-11966-1-git-send-email-vasundhara-v.volam@broadcom.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add part number info from the vital product data to info_get command via devlink tool. Update bnxt.rst documentation as well. Example display: $ devlink dev info pci/0000:3b:00.1 pci/0000:3b:00.1: driver bnxt_en serial_number B0-26-28-FF-FE-C8-85-20 versions: fixed: board.id BCM957508-P2100G asic.id 1750 asic.rev 1 running: fw 216.0.286.0 fw.api 1.10.1 fw.psid 0.0.6 fw.app 216.0.251.0 Cc: Jakub Kicinski Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- v1->v2: Remove serial number information. --- Documentation/networking/devlink/bnxt.rst | 3 +++ drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/Documentation/networking/devlink/bnxt.rst b/Documentation/networking/devlink/bnxt.rst index 71f5a5a..ee8d0f4 100644 --- a/Documentation/networking/devlink/bnxt.rst +++ b/Documentation/networking/devlink/bnxt.rst @@ -51,6 +51,9 @@ The ``bnxt_en`` driver reports the following versions * - Name - Type - Description + * - ``board.id`` + - fixed + - Part number identifying the board design * - ``asic.id`` - fixed - ASIC design identifier diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c index 51abc6c..b0e37ae 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c @@ -403,6 +403,14 @@ static int bnxt_dl_info_get(struct devlink *dl, struct devlink_info_req *req, if (rc) return rc; + if (strlen(bp->board_partno)) { + rc = devlink_info_version_fixed_put(req, + DEVLINK_INFO_VERSION_GENERIC_BOARD_ID, + bp->board_partno); + if (rc) + return rc; + } + sprintf(buf, "%X", bp->chip_num); rc = devlink_info_version_fixed_put(req, DEVLINK_INFO_VERSION_GENERIC_ASIC_ID, buf);