From patchwork Wed Mar 8 05:13:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nelson, Shannon" X-Patchwork-Id: 13165216 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23C3EC742A7 for ; Wed, 8 Mar 2023 05:15:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229817AbjCHFPC (ORCPT ); Wed, 8 Mar 2023 00:15:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbjCHFOW (ORCPT ); Wed, 8 Mar 2023 00:14:22 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2040.outbound.protection.outlook.com [40.107.237.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD23C8C518 for ; Tue, 7 Mar 2023 21:13:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cdy+rJYSon0QITG5ijcACP89Lp9YMncZ262vWT3lp4DBnlCnh+br0nGZV0zJvGa4QjlVdb2EGBIF0VGO7is8PICBNrH/kt9wSA7GZdUsGSQv5SVaR57H+aNo0njdCTUBnbpQrc4ClLDQri1iNF0tAQarMjYyYcmRlUw7ZvndSnw7Y2Pdqp72wECL+4PPQiWxvNTLTciWNA6qXgyWAj2CId2sVtswoXn1e5qd2ODAQePb/P81OFrbMGl3XHjZT/yZneDNSV9/sHYire1Wk699ONZG9jZ5YgLcCX0mhkA7t8N+TzEj2zRb7k5oX1mDxRhf6YKMuJZeS+LV4Zqmk7gyTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/W3l/bDI3HW8uL3QNTgKNR0a+9T5zM/pYUWeKkJ38NM=; b=cHfWAc3Ve9muZbRxrcrIkT1+rn4BTEAmjRM0KMpGXLKUBrqAPQAQm8jMLjELR1qsYH+KZxqE17ten3oxvMeXj4WIfn2suFbfa79DqdUFawYORCljh+m9padoHCv+Nd/5jail1eD80l2TKfwp2hRiFgQs9RM9J+8FBAKZvPocxpq1j0ev/GvuyyWzL5+BWQRkSxkA+oZHSOhzXnDqhZuikdg5x31cRH+tytvMe2VgQgyLszvkdl6TEW+ftg8V35AfhMeZcq/nZVp7CSI4mTsWvZEym3e7Hk2CFoOz3vuiuU8FJ26TbOk6D1hX6TNzBd63yqBaVASoJeC8ldgq0bYXqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=davemloft.net smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/W3l/bDI3HW8uL3QNTgKNR0a+9T5zM/pYUWeKkJ38NM=; b=PSd0V32fQbR9m0XXDt8OGL+1ivTJzG3CKgzBtEkIiixRnnS6b24j//iepjUDarPImFElZgAU/mMkL9fu8dsgDv+VrEQIIWfyr26P+cOgPEm9fOY/byt8fjLWKLR5TkxYgOzbYotZs5Z7v0oknIq+kLPitMIG04qwCzEwAlJFBw4= Received: from BN9P223CA0019.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::24) by DM4PR12MB6638.namprd12.prod.outlook.com (2603:10b6:8:b5::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.28; Wed, 8 Mar 2023 05:13:46 +0000 Received: from BN8NAM11FT080.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10b:cafe::4d) by BN9P223CA0019.outlook.office365.com (2603:10b6:408:10b::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.17 via Frontend Transport; Wed, 8 Mar 2023 05:13:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT080.mail.protection.outlook.com (10.13.176.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6178.17 via Frontend Transport; Wed, 8 Mar 2023 05:13:46 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 7 Mar 2023 23:13:44 -0600 From: Shannon Nelson To: , , , , CC: , , Subject: [PATCH RFC v4 net-next 13/13] pds_core: Kconfig and pds_core.rst Date: Tue, 7 Mar 2023 21:13:10 -0800 Message-ID: <20230308051310.12544-14-shannon.nelson@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230308051310.12544-1-shannon.nelson@amd.com> References: <20230308051310.12544-1-shannon.nelson@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT080:EE_|DM4PR12MB6638:EE_ X-MS-Office365-Filtering-Correlation-Id: 51e2a5b2-608a-45ed-e262-08db1f93e4d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y7jZji0xoIV9mLOUfRtq9z91BOhqDrVEkRQ3g3PkKe0V8kvE1r4p0VFUeVSGPZofvQUE5eRAg4lS+XtpwYCj7REQ452RSg5NK2wx9hWX05VPIRy9pdD7PrmYpgRIJn2zE2m4kY9d3K73Bs96jqahHMsOBTJGoKoPqh2xNO8tV4sAUnjdyoWVBUjRJp7KpPtYKf8ePs+VOm9CKd2uduXGOi+IkTwdNzf8Pp+vLRl/xCWTyWwo1ZWBOi/FjM80/ZTuyWA6rxg0CIKRUV1HDNsMjUqF2ivWrCwW3BjKp6jI0V2dHcqO1VIqyGmwIlKSpxXN8+gT913EO7w7DCf8obQEoTOJe7chyD55F0xGwpczrWenW97qr3w5k4EOyuAXxjEmTZDEiIpxOnn+keMuHHCo+EwZRvuopQc6SNMfhh15rxrvz990+HnpqklBLzw58WFeK1cEkldSWNIKKe8p8R5L5aDf9R8TXJ7Mgthoy8aMT52b0hiNF1ZQ3TQ28ZgH1SCzf2E3Hm05TBiNn8e3J0V8h8kRF26hQnFSOUPLRjHA2hrqy9OlJ+4EBrrR4C6HFnujdVtC97dhmvPw8XSRqgz9H4aneBrSkTveswASDyRgi5534vsQYlq8QuGpeweTtwyvsZvgWgxu+TANZb/0F5hMUFn4JlZYjJKM/t7pv0/SvnUd/sWYpKBmNKGWIgnaEaEcd4jKRCPX65tMC/Bu5S9dYIG31CsLbz6Tk24nNrK3/ntX5pyrvDwNAEgZxsnbbostwrhVIhKXXEsAZe0syZXq9g== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(136003)(396003)(376002)(346002)(451199018)(46966006)(40470700004)(36840700001)(36860700001)(82740400003)(86362001)(81166007)(6666004)(4326008)(40480700001)(36756003)(5660300002)(44832011)(41300700001)(8936002)(356005)(70206006)(70586007)(8676002)(2906002)(82310400005)(40460700003)(336012)(2616005)(186003)(16526019)(83380400001)(43170500006)(426003)(47076005)(316002)(478600001)(54906003)(26005)(1076003)(110136005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2023 05:13:46.2136 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 51e2a5b2-608a-45ed-e262-08db1f93e4d0 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT080.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6638 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC Documentation and Kconfig hook for building the driver. Signed-off-by: Shannon Nelson --- .../device_drivers/ethernet/amd/pds_core.rst | 133 ++++++++++++++++++ .../device_drivers/ethernet/index.rst | 1 + drivers/net/ethernet/amd/Kconfig | 12 ++ drivers/net/ethernet/amd/Makefile | 1 + 4 files changed, 147 insertions(+) create mode 100644 Documentation/networking/device_drivers/ethernet/amd/pds_core.rst diff --git a/Documentation/networking/device_drivers/ethernet/amd/pds_core.rst b/Documentation/networking/device_drivers/ethernet/amd/pds_core.rst new file mode 100644 index 000000000000..06aef385ecdd --- /dev/null +++ b/Documentation/networking/device_drivers/ethernet/amd/pds_core.rst @@ -0,0 +1,133 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +======================================================== +Linux Driver for the AMD/Pensando(R) DSC adapter family +======================================================== + +AMD/Pensando Linux Core driver +Copyright(c) 2023 Advanced Micro Devices, Inc + +Identifying the Adapter +======================= + +To find if one or more AMD/Pensando PCI Core devices are installed on the +host, check for the PCI devices:: + + # lspci -d 1dd8:100c + b5:00.0 Processing accelerators: Pensando Systems Device 100c + b6:00.0 Processing accelerators: Pensando Systems Device 100c + +If such devices are listed as above, then the pds_core.ko driver should find +and configure them for use. There should be log entries in the kernel +messages such as these:: + + $ dmesg | grep pds_core + pds_core 0000:b5:00.0: 252.048 Gb/s available PCIe bandwidth (16.0 GT/s PCIe x16 link) + pds_core 0000:b5:00.0: FW: 1.60.0-73 + pds_core 0000:b6:00.0: 252.048 Gb/s available PCIe bandwidth (16.0 GT/s PCIe x16 link) + pds_core 0000:b6:00.0: FW: 1.60.0-73 + +Driver and firmware version information can be gathered with devlink:: + + $ devlink dev info pci/0000:b5:00.0 + pci/0000:b5:00.0: + driver pds_core + serial_number FLM18420073 + versions: + fixed: + asic.id 0x0 + asic.rev 0x0 + running: + fw 1.51.0-73 + stored: + fw.goldfw 1.15.9-C-22 + fw.mainfwa 1.60.0-73 + fw.mainfwb 1.60.0-57 + + +Info versions +============= + +The ``pds_core`` driver reports the following versions + +.. list-table:: devlink info versions implemented + :widths: 5 5 90 + + * - Name + - Type + - Description + * - ``fw`` + - running + - Version of firmware running on the device + * - ``fw.goldfw`` + - stored + - Version of firmware stored in the goldfw slot + * - ``fw.mainfwa`` + - stored + - Version of firmware stored in the mainfwa slot + * - ``fw.mainfwb`` + - stored + - Version of firmware stored in the mainfwb slot + * - ``asic.id`` + - fixed + - The ASIC type for this device + * - ``asic.rev`` + - fixed + - The revision of the ASIC for this device + + +Parameters +========== + +The ``pds_core`` driver implements the following generic +parameters for controlling the functionality to be made available +as auxiliary_bus devices. + +.. list-table:: Generic parameters implemented + :widths: 5 5 8 82 + + * - Name + - Mode + - Type + - Description + * - ``enable_vnet`` + - runtime + - Boolean + - Enables vDPA functionality through an auxiliary_bus device + + +Firmware Management +=================== + +The ``flash`` command can update a the DSC firmware. The downloaded firmware +will be saved into either of firmware bank 1 or bank 2, whichever is not +currrently in use, and that bank will be then selected for the next boot. + +Enabling the driver +=================== + +The driver is enabled via the standard kernel configuration system, +using the make command:: + + make oldconfig/menuconfig/etc. + +The driver is located in the menu structure at: + + -> Device Drivers + -> Network device support (NETDEVICES [=y]) + -> Ethernet driver support + -> AMD devices + -> AMD/Pensando Ethernet PDS_CORE Support + +Support +======= + +For general Linux networking support, please use the netdev mailing +list, which is monitored by AMD/Pensando personnel:: + + netdev@vger.kernel.org + +For more specific support needs, please use the AMD/Pensando driver support +email:: + + drivers@pensando.io diff --git a/Documentation/networking/device_drivers/ethernet/index.rst b/Documentation/networking/device_drivers/ethernet/index.rst index 392969ac88ad..aae0955eb26b 100644 --- a/Documentation/networking/device_drivers/ethernet/index.rst +++ b/Documentation/networking/device_drivers/ethernet/index.rst @@ -13,6 +13,7 @@ Contents: 3com/3c509 3com/vortex amazon/ena + amd/pds_core altera/altera_tse aquantia/atlantic chelsio/cxgb diff --git a/drivers/net/ethernet/amd/Kconfig b/drivers/net/ethernet/amd/Kconfig index ab42f75b9413..235fcacef5c5 100644 --- a/drivers/net/ethernet/amd/Kconfig +++ b/drivers/net/ethernet/amd/Kconfig @@ -186,4 +186,16 @@ config AMD_XGBE_HAVE_ECC bool default n +config PDS_CORE + tristate "AMD/Pensando Data Systems Core Device Support" + depends on 64BIT && PCI + help + This enables the support for the AMD/Pensando Core device family of + adapters. More specific information on this driver can be + found in + . + + To compile this driver as a module, choose M here. The module + will be called pds_core. + endif # NET_VENDOR_AMD diff --git a/drivers/net/ethernet/amd/Makefile b/drivers/net/ethernet/amd/Makefile index 42742afe9115..2dcfb84731e1 100644 --- a/drivers/net/ethernet/amd/Makefile +++ b/drivers/net/ethernet/amd/Makefile @@ -17,3 +17,4 @@ obj-$(CONFIG_PCNET32) += pcnet32.o obj-$(CONFIG_SUN3LANCE) += sun3lance.o obj-$(CONFIG_SUNLANCE) += sunlance.o obj-$(CONFIG_AMD_XGBE) += xgbe/ +obj-$(CONFIG_PDS_CORE) += pds_core/