Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2197141/?format=api
{ "id": 2197141, "url": "http://patchwork.ozlabs.org/api/patches/2197141/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260217080601.3808847-4-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": "<20260217080601.3808847-4-den@valinux.co.jp>", "list_archive_url": null, "date": "2026-02-17T08:05:55", "name": "[v8,3/9] PCI: endpoint: Add auxiliary resource query API", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "207768e76340655956d318227031cf4909ba6616", "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/20260217080601.3808847-4-den@valinux.co.jp/mbox/", "series": [ { "id": 492390, "url": "http://patchwork.ozlabs.org/api/series/492390/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=492390", "date": "2026-02-17T08:05:52", "name": "PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback", "version": 8, "mbox": "http://patchwork.ozlabs.org/series/492390/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2197141/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197141/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-47429-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=R31/9uAw;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=linux-pci+bounces-47429-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=\"R31/9uAw\"", "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=40.107.74.114", "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\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fFXKf68plz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 19:06:46 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 34AED301062C\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 08:06:33 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 7C85C2DEA62;\n\tTue, 17 Feb 2026 08:06:19 +0000 (UTC)", "from OS0P286CU010.outbound.protection.outlook.com\n (mail-japanwestazon11021114.outbound.protection.outlook.com [40.107.74.114])\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 8CC832E1F0E;\n\tTue, 17 Feb 2026 08:06:17 +0000 (UTC)", "from TY7P286MB7722.JPNP286.PROD.OUTLOOK.COM (2603:1096:405:38f::10)\n by OS7P286MB7132.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:42f::6) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9611.16; Tue, 17 Feb\n 2026 08:06:10 +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.9611.013; Tue, 17 Feb 2026\n 08:06:10 +0000" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771315579; cv=fail;\n b=dvZtnCzDZBUDjhzx8hWB0aU8orVPGm1OAqHxjlWGjy2XYfbaJIip6ZzrYTq36SL80wkLwTbH2U5N+aQjI8Cec7pHtl+PcW/VAQC6Lz0H1COauvU+2fN2G7LtND0SweTtZ1gTRbDCvqan8OPZyLz49GuWHXZESIJEsqQzRhxaBpg=", "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=MM9ynv+qsfO2K7rlYtUwb2yi058wRgsG8L9oonJEyHj7P4GA0doQfQ62s90triijhuklB2Uclv7ppYGKCEwLnHSZBwfDcsih/W6R0n8JCFoWNZAeIlxvC8hcEcPddX4r656Mgs/G15/E4thEWRA/cCxj4pZlKD+uhLtYgXiHNbuM+EY8r63lIoI3lGdEGjZQc76ix2X9VRJfO+x1R/cslcvfMnuN/Uh2jX/Eqh2SP7jAsbh+LWEogetvjcQ2nRhRw0WFLZjUdD8MtGYfs0/+1tCF69RDLWNTuw0Xaj+4b3MBdxWXdtGWUdK65siZm0tnEva4deabiEaP4ubOz1qQpA==" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771315579; c=relaxed/simple;\n\tbh=PxTbLjMewAMWGY784JXwab4skk0wddfnEqT1sdzUfo8=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=pS2P69C51FIzWNIkldhznGG51evS4/2bZSI/JI6x+GEN/bVItaJn1wRQvLr5zLFGEYXg4xYdIXsuCyvov2grJMNr/U6NQiOr+bojvOi+nSecvFFcVPPIyVUxEmNruxGnca4h7Cpst9MtdxYCT0uoMZmyFtDXoHACQmbkz+L2op4=", "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=UnpEJbNlT3wgIICCe6Hn7gKgsJuija/JZQQy7qzTEaA=;\n b=hpqpXLcQpfMb4EVKuEqFn25ois5C5UmBNNX8t+HxbWIpP0+/XynHaCTQ1U4GnHVPp/83Go7BjoYF6AxtN2CRYWfe8Qhcto2iBSEH8tgfJueJiG6+06Y/g+x50nQ4rT8mtIAyIXQQbbI/zuY6A46zVD+snT4Di+H4PJHB2yIM1QZG8RQITFNqtHWsw2DvlP0NnnJ5iIoV/CdJlOHGblD585+177mxPqjdhsAvh55xmS/EOOzbu11c19gKDqT0jTcQy89rd6LmMS2OGBv7FLH4+iLZ1rs4mu7IM3BZlUqoPGAbZtwNfCzKpUDf2grfGXYw2Iqivd0Cuu1zj8Hu7LgmpA==" ], "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=R31/9uAw; arc=fail smtp.client-ip=40.107.74.114", "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=UnpEJbNlT3wgIICCe6Hn7gKgsJuija/JZQQy7qzTEaA=;\n b=R31/9uAw2Vt4yEL7K/Ftoffs2VTmOBfWkjRqHyZW/PZdmZ/cWzvNsnu3rmzMXc6rwJsA27dbcYo1vFd+70mGVPdUwYOI+bcdOj8dl0FF+OXoYpTwb1W162WoYRr0ljZB0q/EqKckyb4LYqWNw9HOlbd0cEBSJTrLZjShfLmU3Z4=", "From": "Koichiro Den <den@valinux.co.jp>", "To": "jingoohan1@gmail.com,\n\tmani@kernel.org,\n\tlpieralisi@kernel.org,\n\tkwilczynski@kernel.org,\n\trobh@kernel.org,\n\tbhelgaas@google.com,\n\theiko@sntech.de,\n\tkishon@kernel.org,\n\tjdmason@kudzu.us,\n\tdave.jiang@intel.com,\n\tallenbh@gmail.com,\n\tcassel@kernel.org,\n\tshawn.lin@rock-chips.com,\n\tFrank.Li@nxp.com", "Cc": "linux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinux-rockchip@lists.infradead.org,\n\tntb@lists.linux.dev", "Subject": "[PATCH v8 3/9] PCI: endpoint: Add auxiliary resource query API", "Date": "Tue, 17 Feb 2026 17:05:55 +0900", "Message-ID": "<20260217080601.3808847-4-den@valinux.co.jp>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20260217080601.3808847-1-den@valinux.co.jp>", "References": "<20260217080601.3808847-1-den@valinux.co.jp>", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-ClientProxiedBy": "TY4P301CA0005.JPNP301.PROD.OUTLOOK.COM\n (2603:1096:405:26f::9) 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_|OS7P286MB7132:EE_", "X-MS-Office365-Filtering-Correlation-Id": "c2a5481d-ee94-4002-42a6-08de6dfb691f", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|366016|376014|1800799024|7416014|10070799003|921020;", "X-Microsoft-Antispam-Message-Info": "\n rsGkcYQBMdZ1akNzeEV/uJ1Nj5FAxnC17AbLCuwwKC3vlQhxM/3Lq1GY5G4upGa0bEIl2+/5xJHZx69cN29vkG8Q0t7hDQav8ZcEaL76F0vgEj23P+6FjGJjLJLm21DkHjSWpXvtHQ6j27htyJ8KYa5SyE9oHmzPL8SDERYkjRNfyR7J6w1IypGURMERe0xXKt7ufvTPQzchFJHiNk0B0KGpzQmNEX7N4ZcLropRgh24BgMlEp9eT9KSV5UGT9VTt0izIG5uDVmpyHXiCNg7KbYWNb61ipu5s23GDbA2wZvYWfvP/foIqO7updF8VtB+odylY7yg4tCPDH85KDTH90HLQij0TUu3DmpZbrpQ+S4azm0iSUv5Is3GgjdK1kU4dXZYc8GDNOwiwzP3H9ljGdXX/cZQH94lDkF/zF8mu+Ga818Kna3D42dsuU8vGUen5lGd+4wtc9gqYbL+YJfAWWBfBG8coTXHSKcbLO2ajZtjkVUymHyCr8lq1YDxqdmVytMCLp+LEZyLg5Vb+NOhDbRkdn4cdhwttbTUxymioHiM1/bEPSzuVySFvdcY8L+0WKjKkHUq2VJA+tbVfD2RABkYBR1HKzjQNeG1hMSeMCWWYDU8HLriNbsjv3uSjbZSaHHGT5pSE7Sv4uvokyL+BYY4W4VPOV5Zj1TXn8j2XUd2mkYqihPJPsQ5d7CI87YzZWNmhBDR/Fhwkd0J7Y/js6YR096KAS7Ex96hVgCsQ43jIVQYKltvGvWtfBRXJqq1zOJfW3jsJx3R6lrb4ryWL1k+0muPR4f/yON9nWaHIIWkhsgXkom8vK7kxOPdxjZpYO0A3s9C6GLtnYSAOwCz6l6YagrTopN619D/W4OwJnZo0QaKnG11o2orJBdKqDUHi73kEwne+o5zI+7C54sIo1K9UDx43i5p3j33R3AOWByPXIiLFqOD12uzC+S8VF+MOlRh1Y0kt1jrzvdhjkHv+npWrQxuuba58aXwymnL6IxjdAjjqU5ADmpCY4S0I9HA8vcj9w2BqqvyTiDdeUFWodhmMJNvHTkcUxf9nhMRwau0WIyaU8JwvqOl87wvIQhHZxazwZui137G3IJTyA/gWNX4wpntm1J2pnvb7mMetDpbv2IQ25hVbgMn2ouYl8HIX25OBsi5JeO2RzaRB+EytasHHmp0xqHC7mXbj9QSE7TdHoT95RP+cO4VQhJDp30EV6e6En7pwPLq8tOuAFbi7ZHJU3qTxnlACR4LOtcKb3/WHEWeZGPRZ/Tqhm0o45fr1SpDjGgpVhH1IZwKv4YzI7ZVdqGEXKTf1bktnkY2UQrGspwrzCYQFrPwiitBJimLUBnN2OmWU42KPm7I4GNZ22S+nGyFTkkK65fA1AMQLw5KdFzTGFkBvN/4ePuRXmH0Xi0YgzImtDBp+yPjLiu8FtG9llt01SoecRbRE0F4wUgYUS92AtzQ7vf7T/QxXuziOUEFRNHLlVPWvFLzcnP/QkKqNL8jG5FLEQ43l8WiAr298HzRKhKRsLoL1HDiQN2vTbEPIa20MSrnc+OQEqp9LPI2DeZsVGH1dcyYnsAqt2vKm1P3+rU7WfqYUc/d9mZN7Yro2EevkDpwDexXayF3sg==", "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)(366016)(376014)(1800799024)(7416014)(10070799003)(921020);DIR:OUT;SFP:1102;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n DYs3ECes0HhtdyAEVe3D3ZKfw0bqezEotV7oXiPvRlxPbB09VKlKy6RXTR2H6VHYu9CzptMCNSeF3tg+rIUwsuuGiw6bNAl+yXDIccxn+4zx3XL2DV3JnNwHZ8E9EN/P29+l8I0Y3f74uVfLKgIbLQlNwoZMI/ln24JZeZiHirdz5fe7pq+hcFE/Xi05353rzqgN78VwjTq3Z2bZW6Ge7Cl30eKHyTt1FuMg4GQienS0sxa4ybYrw/iu796vrL+8EngMp1FFMJKf9ahmVO+lOkY6NJo3cOH2vXGfajhucxXtXwveNVjH8vEPIqMnl5Hk8IGD1E3Amoa9QHd7hEvHCDUD7Zg4+uVwXVlKyh9kBW3MnOIo01wudb8QzjaLpGqdsRD8i4sZaIn+Hff4Kyo0v0K5f3ym0LQFebMMH+qtFKHOkOCoSSRQvKw+FWmntmowocBfTCIAIgCfbGDTAkDKuE2w5AwB5iKX2hIDpwPvxp1cTLaZwG17zYKyC0OcpStwgkwzG0/6BpBEXNFChnW9jVU6bF3iUsxYLc1sDw1CO8CeaRDneuK/nKuczSF96NPnT1yeC7y/UZbCZx/zQnX3+kF7SjaE1Wg0f6tFcKqPJuU4ysoc0hsupzEqxGklZLUtaEcJtera0Zm17iUvxd6Vaqng8LlVhNHNLu9PJ83O4HIGV56cVDnzyTJP9hfHftHAP+/ZQR9Xlyp+Od+0AK0vOIx5heUr6Nt7pdxSL4FwVAsH8xi39CwU/+Equ3CayF+CuhzL7BpCh6sLMYK/sYBcjSuf65gJL7s1XoQRYl7FGFmbsyd2BYMM/Uzcy7R8kTHhUXb/yMmg1WGQ/L/fJUvrklfDhgQMEbiXunWUOjBJopr2BUlMLni73EHqAAciUrU2zkEmlugfsXN9UJvI6/gM+Pv8HiZM5x95LAerJk5TGAJPsvT0XoZ8eRS0ETii9EUOKY+e2ZfByFCorqaW60cx9BzaujZOWQU5+vWURNDA4bxnIlXyBYjisisMHOnvxGOJFHATxwCc0Z3ZYnbmxEdSX7R0Cozm143knl+Jer+2R+Hm3FVX9vz3FShjW1+USg8v/PCiXjRX14x6XCfqyY6S62Y5nwn1HMRbNwl34ZO3svmjFejQoK7x4H5GCgHp4UUkMFsOnxDz+OLYxLx0ckL8lVjrWWixiAiqbn5DAX9/8Un8bz5AVBAKaGflQE+JRZthOg7Fz42UUntHm0YPDfdp36rMdK/EPKCrJTsMHvKT7lEPrpP356lDu30gyGHRtVnfMZO+F9t1NkGtUG7iV3feqpTyaeu85UJliBmf7mnpwakatEKB1RyyrKGlQE1mvwdZcmiXikDnH2eKEdJo4A+HUSjSPGW2zGhGnCuplLxKUTwlA97xo3c7TYab+GKQAenwZFSEHRfgpAJrlXS40hfCU+APo9HcOZQ0YDrUutUpc+gs0M7KPX0/P4dE4A5wDqZRDFhp2pjUDNDkm1I5COhl8Lm80pFkhSuo7MDBhcC++73OfJ7lTHcVijyly5A7ETRtbzSGjI0D3XgNJXVMbFiz4eRTgRw5BjW5CCi9YxjzGTC6H5PcKng5FmruL85vbHX61a3bWwJ11ip0EWwVtWaEduiGooN2Jylitit0EdOqth8qrOS/qJf/rVAlYmcMx97X108tIumLh665+QotMsn+TWTx3/jlHWBLahJD08ogftIgu9bRQQe4oZevCWodVMY3hqqRQHEWsyRj5G05NKmkPxxp81e/RCFyK4pa/n3m5e2fc2s0rxxRUc2gFPttOmrU", "X-OriginatorOrg": "valinux.co.jp", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n c2a5481d-ee94-4002-42a6-08de6dfb691f", "X-MS-Exchange-CrossTenant-AuthSource": "TY7P286MB7722.JPNP286.PROD.OUTLOOK.COM", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "17 Feb 2026 08:06:10.1824\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 OCXUeUG7Bss5WV23R9wSaik6LveiTsMEculIUpDvWSqhrglsQm0T1UCLS1WGrrcDn5pY02HrfwQd5xlqP4Pnmg==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "OS7P286MB7132" }, "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() and the corresponding pci_epc_ops\nget_aux_resources() callback. The API returns a list of resources\ndescribed by type, physical address and size, plus type-specific\nmetadata.\n\nPassing resources == NULL (or num_resources == 0) returns the required\nnumber of entries.\n\nSigned-off-by: Koichiro Den <den@valinux.co.jp>\n---\nChanges since v7:\n - Add a 'data' field in pci_epc_aux_resource.u.db_mmio.\n - Add comments describing the type-specific metadata fields.\n\n drivers/pci/endpoint/pci-epc-core.c | 41 +++++++++++++++++++++++\n include/linux/pci-epc.h | 52 +++++++++++++++++++++++++++++\n 2 files changed, 93 insertions(+)", "diff": "diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c\nindex 068155819c57..01de4bd5047a 100644\n--- a/drivers/pci/endpoint/pci-epc-core.c\n+++ b/drivers/pci/endpoint/pci-epc-core.c\n@@ -155,6 +155,47 @@ 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() - query EPC-provided auxiliary resources\n+ * @epc: EPC device\n+ * @func_no: function number\n+ * @vfunc_no: virtual function number\n+ * @resources: output array (may be NULL to query required count)\n+ * @num_resources: size of @resources array in entries (0 when querying count)\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:\n+ * * >= 0: number of resources returned (or required, if @resources is NULL)\n+ * * -EOPNOTSUPP: backend does not support auxiliary resource queries\n+ * * other -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 (!epc || !epc->ops)\n+\t\treturn -EINVAL;\n+\n+\tif (func_no >= epc->max_functions)\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 7a87f5962dd0..c68aaaf3542a 100644\n--- a/include/linux/pci-epc.h\n+++ b/include/linux/pci-epc.h\n@@ -61,6 +61,51 @@ 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_DMA_CTRL_MMIO: Integrated DMA controller register window (MMIO)\n+ * @PCI_EPC_AUX_DMA_CHAN_DESC: Per-channel DMA descriptor\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_DMA_CTRL_MMIO,\n+\tPCI_EPC_AUX_DMA_CHAN_DESC,\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 +129,7 @@ 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: ops to retrieve controller-owned auxiliary resources\n * @owner: the module owner containing the ops\n */\n struct pci_epc_ops {\n@@ -115,6 +161,9 @@ 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)(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@@ -337,6 +386,9 @@ 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(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": [ "v8", "3/9" ] }