get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2165666/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2165666,
    "url": "http://patchwork.ozlabs.org/api/patches/2165666/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20251117134912.18566-13-larysa.zaremba@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20251117134912.18566-13-larysa.zaremba@intel.com>",
    "list_archive_url": null,
    "date": "2025-11-17T13:48:52",
    "name": "[iwl-next,v5,12/15] ixd: add basic driver framework for Intel(R) Control Plane Function",
    "commit_ref": null,
    "pull_url": null,
    "state": "under-review",
    "archived": false,
    "hash": "f30c585d71fdb809628f89f01e8cfbad17ce7431",
    "submitter": {
        "id": 84900,
        "url": "http://patchwork.ozlabs.org/api/people/84900/?format=api",
        "name": "Larysa Zaremba",
        "email": "larysa.zaremba@intel.com"
    },
    "delegate": {
        "id": 109701,
        "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api",
        "username": "anguy11",
        "first_name": "Anthony",
        "last_name": "Nguyen",
        "email": "anthony.l.nguyen@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20251117134912.18566-13-larysa.zaremba@intel.com/mbox/",
    "series": [
        {
            "id": 482391,
            "url": "http://patchwork.ozlabs.org/api/series/482391/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=482391",
            "date": "2025-11-17T13:48:40",
            "name": "Introduce iXD driver",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/482391/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2165666/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2165666/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=kp5uDG9P;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4d98Hv4f7qz1yND\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 18 Nov 2025 00:49:47 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 33B2C60DD4;\n\tMon, 17 Nov 2025 13:49:45 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id Karh2DDbdxVX; Mon, 17 Nov 2025 13:49:44 +0000 (UTC)",
            "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 30E2960DC2;\n\tMon, 17 Nov 2025 13:49:44 +0000 (UTC)",
            "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists1.osuosl.org (Postfix) with ESMTP id 1A551D5\n for <intel-wired-lan@lists.osuosl.org>; Mon, 17 Nov 2025 13:49:43 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 1814760DC3\n for <intel-wired-lan@lists.osuosl.org>; Mon, 17 Nov 2025 13:49:43 +0000 (UTC)",
            "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id u1V0QF6dDoBL for <intel-wired-lan@lists.osuosl.org>;\n Mon, 17 Nov 2025 13:49:42 +0000 (UTC)",
            "from mgamail.intel.com (mgamail.intel.com [198.175.65.12])\n by smtp3.osuosl.org (Postfix) with ESMTPS id CFA8960DC2\n for <intel-wired-lan@lists.osuosl.org>; Mon, 17 Nov 2025 13:49:41 +0000 (UTC)",
            "from fmviesa007.fm.intel.com ([10.60.135.147])\n by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Nov 2025 05:49:41 -0800",
            "from irvmail002.ir.intel.com ([10.43.11.120])\n by fmviesa007.fm.intel.com with ESMTP; 17 Nov 2025 05:49:36 -0800",
            "from mglak.igk.intel.com (mglak.igk.intel.com [10.237.112.146])\n by irvmail002.ir.intel.com (Postfix) with ESMTP id 98E3837E3D;\n Mon, 17 Nov 2025 13:49:34 +0000 (GMT)"
        ],
        "X-Virus-Scanned": [
            "amavis at osuosl.org",
            "amavis at osuosl.org"
        ],
        "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 30E2960DC2",
            "OpenDKIM Filter v2.11.0 smtp3.osuosl.org CFA8960DC2"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1763387384;\n\tbh=1HlNa4IS7yXnhFylYkKqArlVKKJIjEOsRyQbDADowtw=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=kp5uDG9PuOI2LVJnY3NFZ2QfF8d6yJ/brUP+DijLzMYumFlhkG5fYUwlJGAbdyyNF\n\t slsT8RPoEAXVynaiY8X+BIMptkV6xUemGQZ0/jEHesS7HW0VWl5UkFjpxTYmEBmsLF\n\t mXDAGPH9ys3TY3c0GTC+myJC4stvUyaQCgFW3dV2BSKXlJtHb6FQog3y1TCB+J+OjW\n\t GqAQy7eTyufnuXgpSbedbIG/4TysZPBhdULvB6CnAVwG9GOlvyM264x12snLK10+DG\n\t 8cFfEoLaf3BRIZ+viDNf37VnP810qea+lBYpyoWXszu3LKU2lBSk0ieVluwbUE7mqB\n\t dzC59rkiDap5A==",
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=198.175.65.12;\n helo=mgamail.intel.com; envelope-from=larysa.zaremba@intel.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org CFA8960DC2",
        "X-CSE-ConnectionGUID": [
            "dxT6bMK1QQCghR8vcIlf/g==",
            "dmdgqO60S1qDlum9FZPHjA=="
        ],
        "X-CSE-MsgGUID": [
            "eSOY9S5+THuaxKCpQknh/w==",
            "O7/sGkhOTymG03Ker6nccw=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11616\"; a=\"76846175\"",
            "E=Sophos;i=\"6.19,311,1754982000\"; d=\"scan'208\";a=\"76846175\"",
            "E=Sophos;i=\"6.19,311,1754982000\"; d=\"scan'208\";a=\"190115737\""
        ],
        "X-ExtLoop1": "1",
        "From": "Larysa Zaremba <larysa.zaremba@intel.com>",
        "To": "intel-wired-lan@lists.osuosl.org, Tony Nguyen <anthony.l.nguyen@intel.com>",
        "Cc": "aleksander.lobakin@intel.com, sridhar.samudrala@intel.com,\n \"Singhai, Anjali\" <anjali.singhai@intel.com>,\n Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,\n Larysa Zaremba <larysa.zaremba@intel.com>,\n \"Fijalkowski, Maciej\" <maciej.fijalkowski@intel.com>,\n Emil Tantilov <emil.s.tantilov@intel.com>,\n Madhu Chittim <madhu.chittim@intel.com>, Josh Hay <joshua.a.hay@intel.com>,\n \"Keller, Jacob E\" <jacob.e.keller@intel.com>,\n jayaprakash.shanmugam@intel.com, natalia.wochtman@intel.com,\n Jiri Pirko <jiri@resnulli.us>, \"David S. Miller\" <davem@davemloft.net>,\n Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>,\n Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,\n Jonathan Corbet <corbet@lwn.net>,\n Richard Cochran <richardcochran@gmail.com>,\n Przemek Kitszel <przemyslaw.kitszel@intel.com>,\n Andrew Lunn <andrew+netdev@lunn.ch>, netdev@vger.kernel.org,\n linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org",
        "Date": "Mon, 17 Nov 2025 14:48:52 +0100",
        "Message-ID": "<20251117134912.18566-13-larysa.zaremba@intel.com>",
        "X-Mailer": "git-send-email 2.47.0",
        "In-Reply-To": "<20251117134912.18566-1-larysa.zaremba@intel.com>",
        "References": "<20251117134912.18566-1-larysa.zaremba@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1763387382; x=1794923382;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=5NxpeFPem5dupZlDkmIECYWVmennFW8ehDMdfCoCnRY=;\n b=DUARZsiJHbJAbE3aDQ/V6d50EToCnWliqn85H0W9dLHxYmC3PKbiBJox\n DjRGGGjFKjop4ElXIRdHvWKv/q2eTp4Ybabhw3t+RAwK3JqOQTc0z06gH\n qW+GsidcLgGkE3CPx3nT9I8mQfqyaFn3UbXRwy7WVH1lECMluqxA7aUMd\n a3LN0dw1pbdBBjPNlSdnZDxkqLEJ40sEHj1+Q0tPBtlANnlli+L8Krzr3\n 6sHLjMpMZlak4RNZj6FA255PNuWN9r3G1GcB9VD6n1zBPXv+ybMNfFaGT\n rzlAMVtMJS58vZuXDrAay4A4d7gLWuNxG883Z0lFdos1NEpGjA0ANGpBN\n g==;",
        "X-Mailman-Original-Authentication-Results": [
            "smtp3.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com",
            "smtp3.osuosl.org;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.a=rsa-sha256 header.s=Intel header.b=DUARZsiJ"
        ],
        "Subject": "[Intel-wired-lan] [PATCH iwl-next v5 12/15] ixd: add basic driver\n framework for Intel(R) Control Plane Function",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "Add module register and probe functionality. Add the required support to\nregister IXD PCI driver, as well as probe and remove call backs. Enable the\nPCI device and request the kernel to reserve the memory resources that will\nbe used by the driver. Finally map the BAR0 address space.\n\nFor now, use devm_alloc() to allocate adapter, as it requires the least\namount of code. In a later commit, it will be replaced with a devlink\nalternative.\n\nCo-developed-by: Amritha Nambiar <amritha.nambiar@intel.com>\nSigned-off-by: Amritha Nambiar <amritha.nambiar@intel.com>\nReviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>\nSigned-off-by: Larysa Zaremba <larysa.zaremba@intel.com>\n---\n .../device_drivers/ethernet/index.rst         |   1 +\n .../device_drivers/ethernet/intel/ixd.rst     |  39 ++++++\n drivers/net/ethernet/intel/Kconfig            |   2 +\n drivers/net/ethernet/intel/Makefile           |   1 +\n drivers/net/ethernet/intel/ixd/Kconfig        |  13 ++\n drivers/net/ethernet/intel/ixd/Makefile       |   8 ++\n drivers/net/ethernet/intel/ixd/ixd.h          |  28 +++++\n drivers/net/ethernet/intel/ixd/ixd_lan_regs.h |  28 +++++\n drivers/net/ethernet/intel/ixd/ixd_main.c     | 112 ++++++++++++++++++\n 9 files changed, 232 insertions(+)\n create mode 100644 Documentation/networking/device_drivers/ethernet/intel/ixd.rst\n create mode 100644 drivers/net/ethernet/intel/ixd/Kconfig\n create mode 100644 drivers/net/ethernet/intel/ixd/Makefile\n create mode 100644 drivers/net/ethernet/intel/ixd/ixd.h\n create mode 100644 drivers/net/ethernet/intel/ixd/ixd_lan_regs.h\n create mode 100644 drivers/net/ethernet/intel/ixd/ixd_main.c",
    "diff": "diff --git a/Documentation/networking/device_drivers/ethernet/index.rst b/Documentation/networking/device_drivers/ethernet/index.rst\nindex bcc02355f828..b73d13a2f748 100644\n--- a/Documentation/networking/device_drivers/ethernet/index.rst\n+++ b/Documentation/networking/device_drivers/ethernet/index.rst\n@@ -38,6 +38,7 @@ Contents:\n    intel/igbvf\n    intel/ixgbe\n    intel/ixgbevf\n+   intel/ixd\n    intel/i40e\n    intel/iavf\n    intel/ice\ndiff --git a/Documentation/networking/device_drivers/ethernet/intel/ixd.rst b/Documentation/networking/device_drivers/ethernet/intel/ixd.rst\nnew file mode 100644\nindex 000000000000..1387626e5d20\n--- /dev/null\n+++ b/Documentation/networking/device_drivers/ethernet/intel/ixd.rst\n@@ -0,0 +1,39 @@\n+.. SPDX-License-Identifier: GPL-2.0+\n+\n+==========================================================================\n+iXD Linux* Base Driver for the Intel(R) Control Plane Function\n+==========================================================================\n+\n+Intel iXD Linux driver.\n+Copyright(C) 2025 Intel Corporation.\n+\n+.. contents::\n+\n+For questions related to hardware requirements, refer to the documentation\n+supplied with your Intel adapter. All hardware requirements listed apply to use\n+with Linux.\n+\n+\n+Identifying Your Adapter\n+========================\n+For information on how to identify your adapter, and for the latest Intel\n+network drivers, refer to the Intel Support website:\n+http://www.intel.com/support\n+\n+\n+Support\n+=======\n+For general information, go to the Intel support website at:\n+http://www.intel.com/support/\n+\n+If an issue is identified with the released source code on a supported kernel\n+with a supported adapter, email the specific information related to the issue\n+to intel-wired-lan@lists.osuosl.org.\n+\n+\n+Trademarks\n+==========\n+Intel is a trademark or registered trademark of Intel Corporation or its\n+subsidiaries in the United States and/or other countries.\n+\n+* Other names and brands may be claimed as the property of others.\ndiff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig\nindex 288fa8ce53af..780f113986ea 100644\n--- a/drivers/net/ethernet/intel/Kconfig\n+++ b/drivers/net/ethernet/intel/Kconfig\n@@ -398,4 +398,6 @@ config IGC_LEDS\n \n source \"drivers/net/ethernet/intel/idpf/Kconfig\"\n \n+source \"drivers/net/ethernet/intel/ixd/Kconfig\"\n+\n endif # NET_VENDOR_INTEL\ndiff --git a/drivers/net/ethernet/intel/Makefile b/drivers/net/ethernet/intel/Makefile\nindex 9a37dc76aef0..08b29f3b6801 100644\n--- a/drivers/net/ethernet/intel/Makefile\n+++ b/drivers/net/ethernet/intel/Makefile\n@@ -19,3 +19,4 @@ obj-$(CONFIG_IAVF) += iavf/\n obj-$(CONFIG_FM10K) += fm10k/\n obj-$(CONFIG_ICE) += ice/\n obj-$(CONFIG_IDPF) += idpf/\n+obj-$(CONFIG_IXD) += ixd/\ndiff --git a/drivers/net/ethernet/intel/ixd/Kconfig b/drivers/net/ethernet/intel/ixd/Kconfig\nnew file mode 100644\nindex 000000000000..f5594efe292c\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ixd/Kconfig\n@@ -0,0 +1,13 @@\n+# SPDX-License-Identifier: GPL-2.0-only\n+# Copyright (C) 2025 Intel Corporation\n+\n+config IXD\n+\ttristate \"Intel(R) Control Plane Function Support\"\n+\tdepends on PCI_MSI\n+\tselect LIBETH\n+\tselect LIBIE_PCI\n+\thelp\n+\t  This driver supports Intel(R) Control Plane PCI Function\n+\t  of Intel E2100 and later IPUs and FNICs.\n+\t  It facilitates a centralized control over multiple IDPF PFs/VFs/SFs\n+\t  exposed by the same card.\ndiff --git a/drivers/net/ethernet/intel/ixd/Makefile b/drivers/net/ethernet/intel/ixd/Makefile\nnew file mode 100644\nindex 000000000000..3849bc240600\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ixd/Makefile\n@@ -0,0 +1,8 @@\n+# SPDX-License-Identifier: GPL-2.0-only\n+# Copyright (C) 2025 Intel Corporation\n+\n+# Intel(R) Control Plane Function Linux Driver\n+\n+obj-$(CONFIG_IXD) += ixd.o\n+\n+ixd-y := ixd_main.o\ndiff --git a/drivers/net/ethernet/intel/ixd/ixd.h b/drivers/net/ethernet/intel/ixd/ixd.h\nnew file mode 100644\nindex 000000000000..d813c27941a5\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ixd/ixd.h\n@@ -0,0 +1,28 @@\n+/* SPDX-License-Identifier: GPL-2.0-only */\n+/* Copyright (C) 2025 Intel Corporation */\n+\n+#ifndef _IXD_H_\n+#define _IXD_H_\n+\n+#include <linux/intel/libie/pci.h>\n+\n+/**\n+ * struct ixd_adapter - Data structure representing a CPF\n+ * @hw: Device access data\n+ */\n+struct ixd_adapter {\n+\tstruct libie_mmio_info hw;\n+};\n+\n+/**\n+ * ixd_to_dev - Get the corresponding device struct from an adapter\n+ * @adapter: PCI device driver-specific private data\n+ *\n+ * Return: struct device corresponding to the given adapter\n+ */\n+static inline struct device *ixd_to_dev(struct ixd_adapter *adapter)\n+{\n+\treturn &adapter->hw.pdev->dev;\n+}\n+\n+#endif /* _IXD_H_ */\ndiff --git a/drivers/net/ethernet/intel/ixd/ixd_lan_regs.h b/drivers/net/ethernet/intel/ixd/ixd_lan_regs.h\nnew file mode 100644\nindex 000000000000..a991eaa8a2aa\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ixd/ixd_lan_regs.h\n@@ -0,0 +1,28 @@\n+/* SPDX-License-Identifier: GPL-2.0-only */\n+/* Copyright (C) 2025 Intel Corporation */\n+\n+#ifndef _IXD_LAN_REGS_H_\n+#define _IXD_LAN_REGS_H_\n+\n+/* Control Plane Function PCI ID */\n+#define IXD_DEV_ID_CPF\t\t\t0x1453\n+\n+/* Control Queue (Mailbox) */\n+#define PF_FW_MBX_REG_LEN\t\t4096\n+#define PF_FW_MBX\t\t\t0x08400000\n+\n+/* Reset registers */\n+#define PFGEN_RTRIG_REG_LEN\t\t2048\n+#define PFGEN_RTRIG\t\t\t0x08407000\t/* Device resets */\n+\n+/**\n+ * struct ixd_bar_region - BAR region description\n+ * @offset: BAR region offset\n+ * @size: BAR region size\n+ */\n+struct ixd_bar_region {\n+\tresource_size_t offset;\n+\tresource_size_t size;\n+};\n+\n+#endif /* _IXD_LAN_REGS_H_ */\ndiff --git a/drivers/net/ethernet/intel/ixd/ixd_main.c b/drivers/net/ethernet/intel/ixd/ixd_main.c\nnew file mode 100644\nindex 000000000000..75ee53152e61\n--- /dev/null\n+++ b/drivers/net/ethernet/intel/ixd/ixd_main.c\n@@ -0,0 +1,112 @@\n+// SPDX-License-Identifier: GPL-2.0-only\n+/* Copyright (C) 2025 Intel Corporation */\n+\n+#include \"ixd.h\"\n+#include \"ixd_lan_regs.h\"\n+\n+MODULE_DESCRIPTION(\"Intel(R) Control Plane Function Device Driver\");\n+MODULE_IMPORT_NS(\"LIBIE_PCI\");\n+MODULE_LICENSE(\"GPL\");\n+\n+/**\n+ * ixd_remove - remove a CPF PCI device\n+ * @pdev: PCI device being removed\n+ */\n+static void ixd_remove(struct pci_dev *pdev)\n+{\n+\tstruct ixd_adapter *adapter = pci_get_drvdata(pdev);\n+\n+\tlibie_pci_unmap_all_mmio_regions(&adapter->hw);\n+}\n+\n+/**\n+ * ixd_shutdown - shut down a CPF PCI device\n+ * @pdev: PCI device being shut down\n+ */\n+static void ixd_shutdown(struct pci_dev *pdev)\n+{\n+\tixd_remove(pdev);\n+\n+\tif (system_state == SYSTEM_POWER_OFF)\n+\t\tpci_set_power_state(pdev, PCI_D3hot);\n+}\n+\n+/**\n+ * ixd_iomap_regions - iomap PCI BARs\n+ * @adapter: adapter to map memory regions for\n+ *\n+ * Returns: %0 on success, negative on failure\n+ */\n+static int ixd_iomap_regions(struct ixd_adapter *adapter)\n+{\n+\tconst struct ixd_bar_region regions[] = {\n+\t\t{\n+\t\t\t.offset = PFGEN_RTRIG,\n+\t\t\t.size = PFGEN_RTRIG_REG_LEN,\n+\t\t},\n+\t\t{\n+\t\t\t.offset = PF_FW_MBX,\n+\t\t\t.size = PF_FW_MBX_REG_LEN,\n+\t\t},\n+\t};\n+\n+\tfor (int i = 0; i < ARRAY_SIZE(regions); i++) {\n+\t\tstruct libie_mmio_info *mmio_info = &adapter->hw;\n+\t\tbool map_ok;\n+\n+\t\tmap_ok = libie_pci_map_mmio_region(mmio_info,\n+\t\t\t\t\t\t   regions[i].offset,\n+\t\t\t\t\t\t   regions[i].size);\n+\t\tif (!map_ok) {\n+\t\t\tdev_err(ixd_to_dev(adapter),\n+\t\t\t\t\"Failed to map PCI device MMIO region\\n\");\n+\n+\t\t\tlibie_pci_unmap_all_mmio_regions(mmio_info);\n+\t\t\treturn -EIO;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * ixd_probe - probe a CPF PCI device\n+ * @pdev: corresponding PCI device\n+ * @ent: entry in ixd_pci_tbl\n+ *\n+ * Returns: %0 on success, negative errno code on failure\n+ */\n+static int ixd_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n+{\n+\tstruct ixd_adapter *adapter;\n+\tint err;\n+\n+\tadapter = devm_kzalloc(&pdev->dev, sizeof(*adapter), GFP_KERNEL);\n+\tif (!adapter)\n+\t\treturn -ENOMEM;\n+\tadapter->hw.pdev = pdev;\n+\tINIT_LIST_HEAD(&adapter->hw.mmio_list);\n+\n+\terr = libie_pci_init_dev(pdev);\n+\tif (err)\n+\t\treturn err;\n+\n+\tpci_set_drvdata(pdev, adapter);\n+\n+\treturn ixd_iomap_regions(adapter);\n+}\n+\n+static const struct pci_device_id ixd_pci_tbl[] = {\n+\t{ PCI_VDEVICE(INTEL, IXD_DEV_ID_CPF) },\n+\t{ }\n+};\n+MODULE_DEVICE_TABLE(pci, ixd_pci_tbl);\n+\n+static struct pci_driver ixd_driver = {\n+\t.name\t\t\t= KBUILD_MODNAME,\n+\t.id_table\t\t= ixd_pci_tbl,\n+\t.probe\t\t\t= ixd_probe,\n+\t.remove\t\t\t= ixd_remove,\n+\t.shutdown\t\t= ixd_shutdown,\n+};\n+module_pci_driver(ixd_driver);\n",
    "prefixes": [
        "iwl-next",
        "v5",
        "12/15"
    ]
}