From patchwork Thu Mar 26 06:26:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasundhara Volam X-Patchwork-Id: 221828 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.9 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, 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 DF947C43331 for ; Thu, 26 Mar 2020 06:29:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B08A620714 for ; Thu, 26 Mar 2020 06:29:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Kv2H0Xwk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727600AbgCZG3m (ORCPT ); Thu, 26 Mar 2020 02:29:42 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:45228 "EHLO mail-wr1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbgCZG3l (ORCPT ); Thu, 26 Mar 2020 02:29:41 -0400 Received: by mail-wr1-f44.google.com with SMTP id t7so6255190wrw.12 for ; Wed, 25 Mar 2020 23:29:40 -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=J907FcpDgXW1N7dOZm4k1RpqG8OmdQYV+6AhbaGIPqI=; b=Kv2H0XwkpuddnHHZtvbdxl/+jkSiKqMfFFFt++h8IsAMF7+MP5losKlkiV2iqJwz+E c1W3m9W+NWlw6JmlWH7+5+szFV+3Vb9asAxG7Dq9AnifpCJekEIMff8xtMVeVBv8MLkf 7iS+wkofcQvT1jQJCcNvvR1BEYg9semrUyjR8= 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=J907FcpDgXW1N7dOZm4k1RpqG8OmdQYV+6AhbaGIPqI=; b=eAvrf7B8En8xQUiSABZONTSAfvLNB4fwXrR/Whmakc+N0pdZeqr2FCFSeImZJ1RsbR uZKjJOrRSGnZSU6yLivOIxHx4x8G33OZXfyPKGpN4jq6zhH3y7jxfIoJ3eSBkHaeyWQs 3KGrNf5cSqgpWp6c+uhTnZ5gWWuEIVb/q766oBojqMfzHoxilVIjW7EGQjgjxOzOQP3j gmwNhex2Sqd1XA+QoAINuCtRlfsXWlYJ7FFRQRjka5KxzTsqbWRGDeNDi/prDgSg0gaA X2kg4gXCFUChv+pInprVRPBqsYwQLXPaxokw9gGuonvQQfAKvCdjEFdY1ucsZ0U35Ijf lY0A== X-Gm-Message-State: ANhLgQ0H/FQ/f4i+wgGIRuKr13lzUEQ4RJV2B+WPduMr7e6RYpLANdNp XUvGEMxFcHqqx0f9w9UARwmLjg== X-Google-Smtp-Source: ADFU+vtYiRTxb5ceJZOMi3b/Mtjs2bF5LydW8jnm2c30FCwyRGfZDTBDjiIqv4HU5th/x3XpP3uZqQ== X-Received: by 2002:a05:6000:a:: with SMTP id h10mr7949939wrx.226.1585204179864; Wed, 25 Mar 2020 23:29:39 -0700 (PDT) Received: from lxpurley1.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y200sm2106768wmc.20.2020.03.25.23.29.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2020 23:29:39 -0700 (PDT) From: Vasundhara Volam To: davem@davemloft.net Cc: netdev@vger.kernel.org, Vasundhara Volam , Jakub Kicinski , Jiri Pirko , Jacob Keller , Michael Chan Subject: [PATCH v2 net-next 1/7] devlink: Add macro for "fw.api" to info_get cb. Date: Thu, 26 Mar 2020 11:56:58 +0530 Message-Id: <1585204021-10317-2-git-send-email-vasundhara-v.volam@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1585204021-10317-1-git-send-email-vasundhara-v.volam@broadcom.com> References: <1585204021-10317-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: Jiri Pirko Cc: Jacob Keller 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 06:27:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasundhara Volam X-Patchwork-Id: 221827 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.9 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, 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 69BBCC43331 for ; Thu, 26 Mar 2020 06:30:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4054320772 for ; Thu, 26 Mar 2020 06:30:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="DlU/27zD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726336AbgCZGaC (ORCPT ); Thu, 26 Mar 2020 02:30:02 -0400 Received: from mail-wr1-f45.google.com ([209.85.221.45]:41821 "EHLO mail-wr1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbgCZGaC (ORCPT ); Thu, 26 Mar 2020 02:30:02 -0400 Received: by mail-wr1-f45.google.com with SMTP id h9so6300958wrc.8 for ; Wed, 25 Mar 2020 23:30:01 -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=2huTS4rG7uMC3KslIS2zhFGoF0McQRbFsPLFtRCMtLw=; b=DlU/27zD+fTU0gEZqIIw7h5I8TuqGn+JfBIIvSYwhvWAT+ZRL9lRFVNj8p45CWhbwD JYrIaHi4t823ZNv7/3m7WbA73cm/FNeulfc0pJ9yK2K09hA4nVXFg8CfAMFCIo8MAnEA w5VZ50sBLaGR8DFmmaEWrJxG4MLiUr8AcCKZE= 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=2huTS4rG7uMC3KslIS2zhFGoF0McQRbFsPLFtRCMtLw=; b=cGn5FoBgENw9+OUINZStTJIR1P8FoiXjU5bdrk7ipjjf2lwWfYuSNV3kLFkpFXVzfb KULCxAMEQMJw4p2kEz8BP8vC6rPM3byG7EWGTkFNYxEbwQZu2iPfjdM5OrFBOEMPkFJ/ DLWIwgURGbqCUID+t5fwptOnvAF+Nr1jEkGvOihpkaUIprq4Ztkkl+7vKKtQWDnyTgES nNpNMvne/NxbuCFyXY5va4cvtq1Z2fZABR16EdLToNgj5n8AyemdKcMGoqEAd/J/VpWz IkKaCUUDJ8APdk0gVeTJ4yWn5j6EzC+BFhG/Dqnk/uzzS4yvhxIzIjKdYze4wlf0fQHw hZdw== X-Gm-Message-State: ANhLgQ2rc17A8LBRLzzsfFWxjGYRaDp2j2PqoOtMfF2HEZvWPdt/pPhW Dm/9Y8PmAFnbOhtsbd9gG5P/7A== X-Google-Smtp-Source: ADFU+vsIYqLyH5nLJADRBtxkP+YNUSinTyo6bPI01iSD1w0KLqTtC7U5ZVuisU5tPa0K+fS5hAG7JQ== X-Received: by 2002:a5d:460e:: with SMTP id t14mr4703879wrq.421.1585204200338; Wed, 25 Mar 2020 23:30:00 -0700 (PDT) Received: from lxpurley1.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id y200sm2106768wmc.20.2020.03.25.23.29.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2020 23:29:59 -0700 (PDT) From: Vasundhara Volam To: davem@davemloft.net Cc: netdev@vger.kernel.org, Vasundhara Volam , Jiri Pirko , Michael Chan Subject: [PATCH v2 net-next 3/7] devlink: Add macro for "hw.addr" to info_get cb. Date: Thu, 26 Mar 2020 11:57:00 +0530 Message-Id: <1585204021-10317-4-git-send-email-vasundhara-v.volam@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1585204021-10317-1-git-send-email-vasundhara-v.volam@broadcom.com> References: <1585204021-10317-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 "hw.addr". "hw.addr" displays the hardware address of the interface. Cc: Jiri Pirko Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan --- Documentation/networking/devlink/devlink-info.rst | 5 +++++ include/net/devlink.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/Documentation/networking/devlink/devlink-info.rst b/Documentation/networking/devlink/devlink-info.rst index 650e2c0e3..56d13c5 100644 --- a/Documentation/networking/devlink/devlink-info.rst +++ b/Documentation/networking/devlink/devlink-info.rst @@ -144,6 +144,11 @@ board.manufacture An identifier of the company or the facility which produced the part. +hw.addr +------- + +Hardware address of the interface. + fw -- diff --git a/include/net/devlink.h b/include/net/devlink.h index d51482f..c9383f4 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -476,6 +476,9 @@ enum devlink_param_generic_id { /* Revision of asic design */ #define DEVLINK_INFO_VERSION_GENERIC_ASIC_REV "asic.rev" +/* Hardware address */ +#define DEVLINK_INFO_VERSION_GENERIC_HW_ADDR "hw.addr" + /* Overall FW version */ #define DEVLINK_INFO_VERSION_GENERIC_FW "fw" /* Overall FW interface specification version */ From patchwork Thu Mar 26 06:28:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasundhara Volam X-Patchwork-Id: 221826 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.9 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, 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 816E6C43331 for ; Thu, 26 Mar 2020 06:30:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 46B9E20714 for ; Thu, 26 Mar 2020 06:30:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="HIuuNOyH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727675AbgCZGaf (ORCPT ); Thu, 26 Mar 2020 02:30:35 -0400 Received: from mail-wm1-f54.google.com ([209.85.128.54]:37216 "EHLO mail-wm1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbgCZGaf (ORCPT ); Thu, 26 Mar 2020 02:30:35 -0400 Received: by mail-wm1-f54.google.com with SMTP id d1so5712557wmb.2 for ; Wed, 25 Mar 2020 23:30:34 -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=HIuuNOyHtZ8vE5PXUoCi3aenLXK4DeNW4eiiBfzzfo+MV39IWqeaU7iN9BXDWITohy hlCNW4duOj9Kp2v9EEfEUxtrd8ZWu5/bj4jcMJXLxXXrsXFUa+BpE0OItx0C+O+LZzN6 ShDpzB9vzolBq4RofaFIUgVuzy6/HjeCci95c= 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=Sbj452Lx74uq+Xd7Y3UMJxS2FfoBEjLgyPxiIwvZ14ppeng4F0itlGIGPB5YMgEhCM fNW5qzN4mExOhr/55WvYfcfilnicWLnZ59GABfu330a48N+zeGYAsTetO8F3IL2WAD/e 9X+Q9FB0WdeBdaZfWeQAELF7SQfY9oB3wu6WS5e7BJT3pPUffi6zm52TtdHs1UI4vmYh QQQT2Dr8xoZY25qfJoYHD9Vfe6tttpJ/OlGj+tplgbCR3P5cLK1Od+YMdtaIGiDcdB8v RvFE2uUldOeV0SAnMzarN/sBZo2DoKk2Jho9SW4yHZnx9rl7rjvsKLCPtIUf/yOiCs6i kN1Q== X-Gm-Message-State: ANhLgQ0eaVs2W1f4A6zI3+SVfvLVmIkv7LDrEO7DR3Om46O0LxY0BHzh 2K4c45IsoxTQFPlYXBVEKhPSNw== X-Google-Smtp-Source: ADFU+vvOcwwRoJQy9AG39pNs4o3qyDriNCdEwAcfsgMPLvxYqbzuKTHbgcb95QVV2MxWH+4JfavfuA== X-Received: by 2002:a05:600c:cc:: with SMTP id u12mr1443982wmm.60.1585204233385; Wed, 25 Mar 2020 23:30:33 -0700 (PDT) Received: from lxpurley1.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 9sm2041731wmm.6.2020.03.25.23.30.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2020 23:30:32 -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 v2 net-next 5/7] PCI: Add new PCI_VPD_RO_KEYWORD_SERIALNO macro Date: Thu, 26 Mar 2020 11:58:39 +0530 Message-Id: <1585204119-10371-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 06:29:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasundhara Volam X-Patchwork-Id: 221825 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.9 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, 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 B943EC43331 for ; Thu, 26 Mar 2020 06:30:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E1792078E for ; Thu, 26 Mar 2020 06:30:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="QUz3aUqz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727612AbgCZGa4 (ORCPT ); Thu, 26 Mar 2020 02:30:56 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:50606 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbgCZGa4 (ORCPT ); Thu, 26 Mar 2020 02:30:56 -0400 Received: by mail-wm1-f66.google.com with SMTP id d198so5277230wmd.0 for ; Wed, 25 Mar 2020 23:30:54 -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=vCywXrPM+RXAEKueJsXEcStE/qK7ypaCxILLHInXhdU=; b=QUz3aUqz1Rv8+NdlBs9WDYP0acjj85eQr33P0bHZF14w0L/OXQqD4J8hnK1uHOLkiB LVFsLgipEmJC5TfRBgIX9y0IA9vncYGdT+AXn2p2qjoFkGtpCNv9tkILnDCmjIhzNijT rnhO+AKCTr4+fAHqtInDJ5mTXf3L6NYPbDJuY= 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=vCywXrPM+RXAEKueJsXEcStE/qK7ypaCxILLHInXhdU=; b=rNlkoEQAlGZcrkqiVkawtT2nJsqdi3vWO3JSKr7vUOv/pRaOfZ/whoKCMCyw5kVsU7 IKmfaDbiocfqUKemKfi+pMbPeKGLhv2zsZ2+xbLLzgJmomhufyemhGc15i9bMlxArdgK ruLf7DV4Dohbmc14yOapGJWwaokEU8KAuwoqPk+xU/u3dZaFRuhfKMFsGxDwKZK8k4cq l2rGnFwNcJzFoDgGVWaLLQaubM3aC4gZw9c81Ru5paPA0l1HEgBzvvEF7j6MKbhE2JV1 Uj8TGPBzakEVZmlU5UohU0D/Hai9EMBSV47URPnNFck4mAsWVINyiAiFrLQlWDgA2gGK 5zoQ== X-Gm-Message-State: ANhLgQ1cBbHLV3i8aRqBbAD4MtKZXLEtklABdVInlkCOOy/uXdPxHXA8 YZ5AfvkhgkVKgB3TTEhst+okRg== X-Google-Smtp-Source: ADFU+vuETKn9nsol7DcUSPTtagosAIWGAA8HDjSfIpHJEldZvnNEa36ExuvBxz+dm4ehlO2tJ+BJnA== X-Received: by 2002:a7b:c5cd:: with SMTP id n13mr1380001wmk.125.1585204254056; Wed, 25 Mar 2020 23:30:54 -0700 (PDT) Received: from lxpurley1.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o9sm2155583wrw.20.2020.03.25.23.30.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2020 23:30:53 -0700 (PDT) From: Vasundhara Volam To: davem@davemloft.net Cc: netdev@vger.kernel.org, Vasundhara Volam , Jakub Kicinski , Michael Chan Subject: [PATCH v2 net-next 7/7] bnxt_en: Add partno to devlink info_get cb Date: Thu, 26 Mar 2020 11:59:03 +0530 Message-Id: <1585204143-10417-2-git-send-email-vasundhara-v.volam@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1585204143-10417-1-git-send-email-vasundhara-v.volam@broadcom.com> References: <1585204143-10417-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: hw.addr b0:26:28:c8:85:21 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 a514664..1f28e2f 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 493a9eb..e1061c4 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);