get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223138,
    "url": "http://patchwork.ozlabs.org/api/patches/2223138/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260414141514.1341429-2-den@valinux.co.jp/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api",
        "name": "Linux PCI development",
        "link_name": "linux-pci",
        "list_id": "linux-pci.vger.kernel.org",
        "list_email": "linux-pci@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260414141514.1341429-2-den@valinux.co.jp>",
    "list_archive_url": null,
    "date": "2026-04-14T14:15:08",
    "name": "[v14,1/7] PCI: endpoint: Add auxiliary resource query API",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6edb8a12a16eebb6187a89a1e85ab2bc852c898d",
    "submitter": {
        "id": 91573,
        "url": "http://patchwork.ozlabs.org/api/people/91573/?format=api",
        "name": "Koichiro Den",
        "email": "den@valinux.co.jp"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260414141514.1341429-2-den@valinux.co.jp/mbox/",
    "series": [
        {
            "id": 499855,
            "url": "http://patchwork.ozlabs.org/api/series/499855/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=499855",
            "date": "2026-04-14T14:15:08",
            "name": "PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback",
            "version": 14,
            "mbox": "http://patchwork.ozlabs.org/series/499855/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223138/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223138/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-52492-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-pci@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=valinux.co.jp header.i=@valinux.co.jp\n header.a=rsa-sha256 header.s=selector1 header.b=F90S0QhY;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-pci+bounces-52492-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp\n header.b=\"F90S0QhY\"",
            "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.228.133",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=valinux.co.jp",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=valinux.co.jp",
            "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=valinux.co.jp;"
        ],
        "Received": [
            "from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\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 4fw5tR6Tbzz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 00:16:31 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id E1C51300E001\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 14:16:28 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id CDABF3469F4;\n\tTue, 14 Apr 2026 14:16:27 +0000 (UTC)",
            "from OS0P286CU011.outbound.protection.outlook.com\n (mail-japanwestazon11020133.outbound.protection.outlook.com [52.101.228.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id F34742F8BF0;\n\tTue, 14 Apr 2026 14:16:25 +0000 (UTC)",
            "from TY7P286MB7722.JPNP286.PROD.OUTLOOK.COM (2603:1096:405:38f::10)\n by TY3P286MB2529.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:222::14) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.48; Tue, 14 Apr\n 2026 14:16:23 +0000",
            "from TY7P286MB7722.JPNP286.PROD.OUTLOOK.COM\n ([fe80::2305:327c:28ec:9b32]) by TY7P286MB7722.JPNP286.PROD.OUTLOOK.COM\n ([fe80::2305:327c:28ec:9b32%5]) with mapi id 15.20.9769.046; Tue, 14 Apr 2026\n 14:16:23 +0000"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776176187; cv=fail;\n b=ucIBtWzQY38EzBRLURaM0nADjGpyQLvtoYyXHsnpwWICLEkCZ0wIXSLd4/1l/ekMaFjiXHN1clpqh8RKAKaMHGG54LVM5HOWXIKtxPWxALf+iaIMWDBFUz54eGmWpdDeDugLlS92tN0gRBx3hen/IyEtK7S3UzA2R48cNi68ZHA=",
            "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=A96201vMrhT5ZXwoaVW48WBURrQDeYOMK3MGprR5/Oq7ch9m6BsNoaYFvJKSaMl68GYXCir8f2gJT7mO9MKvPLOcBYep5pNMilMVCVpw0vtljrZfZOsIVIw1DrknPzSYLpY6PSrInGpOYncSbD80NAIVZ11UZGL87U5W6bfbwy0XCyFqQXsz1iXpqhiajXoi//nIuAodkeuPdTGJJKhbw0elB+xDocUboIWT3u7ZdJgOVr4aJz7bsR5eD/W5G0vH+Fp2o/xDH0ZdP/JjCn2AByYfOtR7ypQkdqbbs/NOdTXh2gjB/15mnivFWN22fDpch15JK9o05Ko+YJ85EUgNLw=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776176187; c=relaxed/simple;\n\tbh=jSyxzDyMc+yL3KObyWMDVtqAuUeHAO3mhGBFmXksR7A=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=OkMxnHRGpCJTwS7RPpa1eVwYFHOEHBxhOwLwreLRmGffyjuIQQ3Q2rHAD3v/FHFmbreCPQzO5z6DKMLtSx8fuv0paSLVhStaZCWcCAHffH/4V9VqJpHJR9JGc6iI6cvLkatkXFSocCU4sW1tsSUDaeGC8qGhgzET2RLZGOqCVfI=",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n 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;\n bh=/4HnJvHpfcGaR8/bBQQX4t9TQMonu32ecofiMGCq9CA=;\n b=qtfmjtHGkuTbjH/LrYNrmKKEhzJo2W/qF45r74v3kXm3JPsfi5S+FMHaANxWekDU2D/DZLeWKnd0E+scobrBpXsV0XpZEQWoIeIgyb8fweCIpsjwa/gWM74RmolI1HORTY9kpP3+IE/C5aYLRBK+DSbmBRgAOIdvjAFI0oygflmfiUfKGkG3jKUf23PKnAe5SawEfdk5Tuoz1RvjJOeyXSEO6tWF72EGFXPVf5uwuIVR4n50thGh25mMb8SZcwIMvrKvOdWTI0WssBcBJTx0UwhVVmppBATXru1Qnj8s2C6k3KLggZVTuZv+dsBSQhvqqY0guZSMzyyJvj/VmOXlFQ=="
        ],
        "ARC-Authentication-Results": [
            "i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=valinux.co.jp;\n spf=pass smtp.mailfrom=valinux.co.jp;\n dkim=pass (1024-bit key) header.d=valinux.co.jp header.i=@valinux.co.jp\n header.b=F90S0QhY; arc=fail smtp.client-ip=52.101.228.133",
            "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=valinux.co.jp; dmarc=pass action=none\n header.from=valinux.co.jp; dkim=pass header.d=valinux.co.jp; arc=none"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=valinux.co.jp;\n s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=/4HnJvHpfcGaR8/bBQQX4t9TQMonu32ecofiMGCq9CA=;\n b=F90S0QhYr2It4KKgsdmTGcLkjWiSz3schs9UoOw43Um4O2qFoSJYy0YHqDgVY5ycUOn/4UJKl5YWkZJQnB3PeKY6ECflUYqZp6NcYbFszk5uYayubbgayzgTs3vJnmIZQILTkbdVCrnanBN7dI85z1SlUVue5S7xtinTqg57280=",
        "From": "Koichiro Den <den@valinux.co.jp>",
        "To": "Jingoo Han <jingoohan1@gmail.com>,\n Manivannan Sadhasivam <mani@kernel.org>,\n Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy=C5=84?=\n\t=?utf-8?q?ski?= <kwilczynski@kernel.org>, Rob Herring <robh@kernel.org>,\n Bjorn Helgaas <bhelgaas@google.com>,\n Kishon Vijay Abraham I <kishon@kernel.org>, Jon Mason <jdmason@kudzu.us>,\n Dave Jiang <dave.jiang@intel.com>, Allen Hubbe <allenbh@gmail.com>,\n Niklas Cassel <cassel@kernel.org>, Frank Li <Frank.Li@nxp.com>,\n Bhanu Seshu Kumar Valluri <bhanuseshukumar@gmail.com>,\n Marco Crivellari <marco.crivellari@suse.com>,\n Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>,\n Manikanta Maddireddy <mmaddireddy@nvidia.com>",
        "Cc": "linux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tntb@lists.linux.dev",
        "Subject": "[PATCH v14 1/7] PCI: endpoint: Add auxiliary resource query API",
        "Date": "Tue, 14 Apr 2026 23:15:08 +0900",
        "Message-ID": "<20260414141514.1341429-2-den@valinux.co.jp>",
        "X-Mailer": "git-send-email 2.51.0",
        "In-Reply-To": "<20260414141514.1341429-1-den@valinux.co.jp>",
        "References": "<20260414141514.1341429-1-den@valinux.co.jp>",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-ClientProxiedBy": "TYCP301CA0071.JPNP301.PROD.OUTLOOK.COM\n (2603:1096:405:7d::18) To TY7P286MB7722.JPNP286.PROD.OUTLOOK.COM\n (2603:1096:405:38f::10)",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-pci@vger.kernel.org",
        "List-Id": "<linux-pci.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "TY7P286MB7722:EE_|TY3P286MB2529:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "6cced81d-566d-4a77-973b-08de9a30686b",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|10070799003|7416014|376014|366016|1800799024|921020|56012099003|22082099003|18002099003;",
        "X-Microsoft-Antispam-Message-Info": "\n\tNv47dTs/Ni8noQtu3SKuYQ7p4ih3nRpVw4DEAeVHgh9lToD32Nhlw79BgEzkBwL4YImN07TNAkfuPQwGe7ZRx0Rzsd5nmNHiBXKQmttjkA7y1ycDfDbVLBYOWvuiNroSyfftE8yPpasQ9V1jD3H8m4HhEp/K5nFroci7EP6hi2DXUanCrZ9yeTiZnCJ3CRtofeduH7fupG0jYOnfFQFbYzhx45T5CiPvCvbTZOou7WQP3IFGo65ECUI5xjIcR4ycSxLGEa0vheD6Xv//UtLx64+nkNF47stNwSE/mhWb2Gea6MdoCbBSwSLi0jZWHyUYX0K7IFShzKuat245BrG0rQgu6Usk0PxcJM7s/Hsd/q2YqSQTECujbbyfC9f3byJffFYSjjjIHKbRVuMwlm1tPSl5yJM0G0A9ECFeXeXAhweo1jTi9WEeKj2TS3jbmsYVO6RtyDh1bywMgeM7yOEGh5IpvtMW+bMiTU2dQcbR1Wst0FsYBNBLQJ4Zkt1sb8VK/y0ilYWd9UTT7+LpilcZvHDA2SNGCJk2ODW6QJNWlOxnlkqSXR0FxMeD5R245nkPYkPglcly7l6pqS86DoOYpbgMK40hkWVAFw3DDQyRbKhOVhXl3lMcrKN/t9/baFQlInL5cw6Ai8fDwM79RdomSGrCs7m2f14S/qc1H6w3uvdWr/UpikdH1sBPDazuPuwcJliVNuErRFE95QHymZJLCrOgSqpCGXCCN3i+ofeZ4MHU0MRxushQA9vVLsMFDVCN9FSVTLlS2uCXBo1lcIiXhw==",
        "X-Forefront-Antispam-Report": "\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY7P286MB7722.JPNP286.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(10070799003)(7416014)(376014)(366016)(1800799024)(921020)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1102;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n 75rNFHYdZOunYJueJsScVuJMKeOAa6yU/ismXcPizjrM+kt5RdwKtsAvlZc58sqVHejGUXM5OJONNXAnKmgtpqdQWJE660Y0Vd85cQ3AjkAacaAMP/ZASb9L5XPJfitqnc0kmgi6gFAfhYl0P+VRDadrrtkOHuqhSINOe/nNbmzP0o1G28R8PBP5pcKvL0LElzEYEpPVGEl9pVbA1JEaZSbgkXDRWF5QCm65H8V4XeD654TbL0flZ/tBu9coQqH77+XH1/RAJn02pgbOUUWkG7FGS62J1FezDD9+l5Vy4ygxE4LYCtLVJgBM5WhHVVB6cN6/dohXZY5jBRy8DxRHYWUvAUn5mnmJF9ADozSXEeA7MDc7rBZGfQN2DeTAJNMOsVf7r4rqjkZg0QjPpa2LJxQFR+kSkmkTdAHG1KioVfR3tWaf2aNvccTExWXi3qj9lVmDX73wpJSnkKEJmvNKX0DA9j2AkAR6x19CjCP+O6Yrt/ZhsOFwpF/ueB2qTNNvzSlm9LKB4dYOmJV7LLQjHXsYYhf3iueLwb6uO8EspRzj6i/v5gQAPy8gR6X7dLDGDgs8BLxqPgzJHwOpmgotYfYFTHk0mMzPh0efCpnoOGgBxQ0z4Dd505u6UvR+28HEXWJFbomvXCduegnHIwN6YsIj/c9sU7xZKiYY4Mi5yUeteEyWkqTl7NQW6+PJsG83/cdmaQ3WUVh4uFM+PmuKiH+CotSkEk/w6xMGaknUtAy+EP54/dSiaweJECjFdJSgIQSsMjq7Enjs7QyWc+Z9upoUKz8LI6y2HU70+FkiOqpCVRNTNAaXIOxex4Zbc8o3Zu7ydEP1feaYWBiuaa9lLTa85Qtn0FnBnlrsTv0zAMTHeW1wThzHRyWytwEyI3w8IdQZ6tnDffXwayEBZDjbeeXy11tEdk6u0dPb/JG9lnpkgAJ/kOVEQ175jWZ4/GMKfc416KkO+TOzBeOYrx8epzw7hLRoR0p0uYkraEubZ0dNjkCXqcZmxJooTnjFmBYDMVIlrBF962gDwOWBAHvkNPaSxzldhz3evbw5gYT1bs/7pIYaur2/mL1XCLWe1pp+sEqZRqw60JTYc4qyTaGPXWCZcwnNCDoNTA3qTrRBd5DJNJIb4avRnOTi9346PAi3p0MLwGgCkVByR0/sFC3+/FVD/Q9tESTFQq1U8SR5RvAa9LPV5w44JtbBOaBSj4ZDTh/v8O2yyHhfFj+wI1PvOgd8iJAmcfw3EFfYT2KzNirINqqi16hEpNTUcDJcNVsSg7HHwoghteNbqd5rz+YdJiVx8pgjnLtmjKS694KIx218OebgdczLEDHrBZOFi+L6sE1iDTyW8r1MjYNjADseyOpZBbIzaQji6lQGrb9zZu/Vos7wNnrq3M6rERI7avFt9ShWxn9HYCIB+SeY6Q32LLTuLVeUKBfvRa3QCM6nyCpfZPtOcD0+3dR28vj5cUalFI5EYwtqn39J9+fmik1oQw4GjHtNDDFRgIkRMhngnavNjq0yLkbFl+qcWoM38d/M9eTQCEGy4EK/ALGGq1BfbXQ5SYHrlE7ewnfAnp5Dcf/hYEvlIjOL30oH1f30Xx2AJvXfTy/S+lw1zZJ/fW+Mk+fjmet/tqE9Xj6jM27S9n/tIWF0zL0YrmgHi9kkRwTZLuDRHXpA7Dqe4q0NTNh5u/tzHi0Xy3jIU/Rek4OY17rjCe2B92lonq0ql897SFeuqp2yPslXdnOtx8QXceHTQlx8qwPz9rilLb35vuSV2rMRsii01XqtlZjl/50iTX1R",
        "X-OriginatorOrg": "valinux.co.jp",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 6cced81d-566d-4a77-973b-08de9a30686b",
        "X-MS-Exchange-CrossTenant-AuthSource": "TY7P286MB7722.JPNP286.PROD.OUTLOOK.COM",
        "X-MS-Exchange-CrossTenant-AuthAs": "Internal",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "14 Apr 2026 14:16:23.4654\n (UTC)",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "Hosted",
        "X-MS-Exchange-CrossTenant-Id": "7a57bee8-f73d-4c5f-a4f7-d72c91c8c111",
        "X-MS-Exchange-CrossTenant-MailboxType": "HOSTED",
        "X-MS-Exchange-CrossTenant-UserPrincipalName": "\n leFoA9I8YDZRW1hE1DkojXrrUK4nh2IIHt067mYdvzSL7m0nwBh/6yrQfhsowZcn9s2GzeEok7a3SqSuV6VKCg==",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "TY3P286MB2529"
    },
    "content": "Endpoint controller drivers may integrate auxiliary blocks (e.g. DMA\nengines) whose register windows and descriptor memories metadata need to\nbe exposed to a remote peer. Endpoint function drivers need a generic\nway to discover such resources without hard-coding controller-specific\nhelpers.\n\nAdd pci_epc_get_aux_resources_count() / pci_epc_get_aux_resources() and\nthe corresponding pci_epc_ops callbacks. The count helper returns the\nnumber of available resources, while the get helper fills a\ncaller-provided array of resources described by type, physical address\nand size, plus type-specific metadata.\n\nSuggested-by: Manivannan Sadhasivam <mani@kernel.org>\nSuggested-by: Frank Li <Frank.li@nxp.com>\nSigned-off-by: Koichiro Den <den@valinux.co.jp>\n---\nChanges in v14:\n  - Fix whitespace and alignment issues reported by checkpatch.pl.\n\n drivers/pci/endpoint/pci-epc-core.c | 80 +++++++++++++++++++++++++++++\n include/linux/pci-epc.h             | 54 +++++++++++++++++++\n 2 files changed, 134 insertions(+)",
    "diff": "diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c\nindex 6c3c58185fc5..831b40458dcd 100644\n--- a/drivers/pci/endpoint/pci-epc-core.c\n+++ b/drivers/pci/endpoint/pci-epc-core.c\n@@ -156,6 +156,86 @@ const struct pci_epc_features *pci_epc_get_features(struct pci_epc *epc,\n }\n EXPORT_SYMBOL_GPL(pci_epc_get_features);\n \n+/**\n+ * pci_epc_get_aux_resources_count() - get the number of EPC-provided auxiliary resources\n+ * @epc: EPC device\n+ * @func_no: function number\n+ * @vfunc_no: virtual function number\n+ *\n+ * Some EPC backends integrate auxiliary blocks (e.g. DMA engines) whose control\n+ * registers and/or descriptor memories can be exposed to the host by mapping\n+ * them into BAR space. This helper queries how many such resources the backend\n+ * provides.\n+ *\n+ * Return: the number of available resources on success, -EOPNOTSUPP if the\n+ * backend does not support auxiliary resource queries, or another -errno on\n+ * failure.\n+ */\n+int pci_epc_get_aux_resources_count(struct pci_epc *epc, u8 func_no,\n+\t\t\t\t    u8 vfunc_no)\n+{\n+\tint count;\n+\n+\tif (!epc || !epc->ops)\n+\t\treturn -EINVAL;\n+\n+\tif (!pci_epc_function_is_valid(epc, func_no, vfunc_no))\n+\t\treturn -EINVAL;\n+\n+\tif (!epc->ops->get_aux_resources_count)\n+\t\treturn -EOPNOTSUPP;\n+\n+\tmutex_lock(&epc->lock);\n+\tcount = epc->ops->get_aux_resources_count(epc, func_no,\n+\t\t\t\t\t\t  vfunc_no);\n+\tmutex_unlock(&epc->lock);\n+\n+\treturn count;\n+}\n+EXPORT_SYMBOL_GPL(pci_epc_get_aux_resources_count);\n+\n+/**\n+ * pci_epc_get_aux_resources() - query EPC-provided auxiliary resources\n+ * @epc: EPC device\n+ * @func_no: function number\n+ * @vfunc_no: virtual function number\n+ * @resources: output array\n+ * @num_resources: size of @resources array in entries\n+ *\n+ * Some EPC backends integrate auxiliary blocks (e.g. DMA engines) whose control\n+ * registers and/or descriptor memories can be exposed to the host by mapping\n+ * them into BAR space. This helper queries the backend for such resources.\n+ *\n+ * Return: 0 on success, -EOPNOTSUPP if the backend does not support auxiliary\n+ * resource queries, or another -errno on failure.\n+ */\n+int pci_epc_get_aux_resources(struct pci_epc *epc, u8 func_no, u8 vfunc_no,\n+\t\t\t      struct pci_epc_aux_resource *resources,\n+\t\t\t      int num_resources)\n+{\n+\tint ret;\n+\n+\tif (!resources || num_resources <= 0)\n+\t\treturn -EINVAL;\n+\n+\tif (!epc || !epc->ops)\n+\t\treturn -EINVAL;\n+\n+\tif (!pci_epc_function_is_valid(epc, func_no, vfunc_no))\n+\t\treturn -EINVAL;\n+\n+\tif (!epc->ops->get_aux_resources)\n+\t\treturn -EOPNOTSUPP;\n+\n+\tmutex_lock(&epc->lock);\n+\tret = epc->ops->get_aux_resources(epc, func_no, vfunc_no, resources,\n+\t\t\t\t\t  num_resources);\n+\tmutex_unlock(&epc->lock);\n+\n+\treturn ret;\n+}\n+EXPORT_SYMBOL_GPL(pci_epc_get_aux_resources);\n+\n /**\n  * pci_epc_stop() - stop the PCI link\n  * @epc: the link of the EPC device that has to be stopped\ndiff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h\nindex 1eca1264815b..f247cf9bcf1a 100644\n--- a/include/linux/pci-epc.h\n+++ b/include/linux/pci-epc.h\n@@ -61,6 +61,47 @@ struct pci_epc_map {\n \tvoid __iomem\t*virt_addr;\n };\n \n+/**\n+ * enum pci_epc_aux_resource_type - auxiliary resource type identifiers\n+ * @PCI_EPC_AUX_DOORBELL_MMIO: Doorbell MMIO, that might be outside the DMA\n+ *                             controller register window\n+ *\n+ * EPC backends may expose auxiliary blocks (e.g. DMA engines) by mapping their\n+ * register windows and descriptor memories into BAR space. This enum\n+ * identifies the type of each exposable resource.\n+ */\n+enum pci_epc_aux_resource_type {\n+\tPCI_EPC_AUX_DOORBELL_MMIO,\n+};\n+\n+/**\n+ * struct pci_epc_aux_resource - a physical auxiliary resource that may be\n+ *                               exposed for peer use\n+ * @type:       resource type, see enum pci_epc_aux_resource_type\n+ * @phys_addr:  physical base address of the resource\n+ * @size:       size of the resource in bytes\n+ * @bar:        BAR number where this resource is already exposed to the RC\n+ *              (NO_BAR if not)\n+ * @bar_offset: offset within @bar where the resource starts (valid iff\n+ *              @bar != NO_BAR)\n+ * @u:          type-specific metadata\n+ */\n+struct pci_epc_aux_resource {\n+\tenum pci_epc_aux_resource_type type;\n+\tphys_addr_t phys_addr;\n+\tresource_size_t size;\n+\tenum pci_barno bar;\n+\tresource_size_t bar_offset;\n+\n+\tunion {\n+\t\t/* PCI_EPC_AUX_DOORBELL_MMIO */\n+\t\tstruct {\n+\t\t\tint irq; /* IRQ number for the doorbell handler */\n+\t\t\tu32 data; /* write value to ring the doorbell */\n+\t\t} db_mmio;\n+\t} u;\n+};\n+\n /**\n  * struct pci_epc_ops - set of function pointers for performing EPC operations\n  * @write_header: ops to populate configuration space header\n@@ -84,6 +125,9 @@ struct pci_epc_map {\n  * @start: ops to start the PCI link\n  * @stop: ops to stop the PCI link\n  * @get_features: ops to get the features supported by the EPC\n+ * @get_aux_resources_count: ops to get the number of controller-owned\n+ *                           auxiliary resources\n+ * @get_aux_resources: ops to retrieve controller-owned auxiliary resources\n  * @owner: the module owner containing the ops\n  */\n struct pci_epc_ops {\n@@ -115,6 +159,11 @@ struct pci_epc_ops {\n \tvoid\t(*stop)(struct pci_epc *epc);\n \tconst struct pci_epc_features* (*get_features)(struct pci_epc *epc,\n \t\t\t\t\t\t       u8 func_no, u8 vfunc_no);\n+\tint\t(*get_aux_resources_count)(struct pci_epc *epc, u8 func_no,\n+\t\t\t\t\t   u8 vfunc_no);\n+\tint\t(*get_aux_resources)(struct pci_epc *epc, u8 func_no, u8 vfunc_no,\n+\t\t\t\t     struct pci_epc_aux_resource *resources,\n+\t\t\t\t     int num_resources);\n \tstruct module *owner;\n };\n \n@@ -343,6 +392,11 @@ int pci_epc_start(struct pci_epc *epc);\n void pci_epc_stop(struct pci_epc *epc);\n const struct pci_epc_features *pci_epc_get_features(struct pci_epc *epc,\n \t\t\t\t\t\t    u8 func_no, u8 vfunc_no);\n+int pci_epc_get_aux_resources_count(struct pci_epc *epc, u8 func_no,\n+\t\t\t\t    u8 vfunc_no);\n+int pci_epc_get_aux_resources(struct pci_epc *epc, u8 func_no, u8 vfunc_no,\n+\t\t\t      struct pci_epc_aux_resource *resources,\n+\t\t\t      int num_resources);\n enum pci_barno\n pci_epc_get_first_free_bar(const struct pci_epc_features *epc_features);\n enum pci_barno pci_epc_get_next_free_bar(const struct pci_epc_features\n",
    "prefixes": [
        "v14",
        "1/7"
    ]
}