get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218407,
    "url": "http://patchwork.ozlabs.org/api/patches/2218407/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401073022.215805-4-a-garg7@ti.com/",
    "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": "<20260401073022.215805-4-a-garg7@ti.com>",
    "list_archive_url": null,
    "date": "2026-04-01T07:30:21",
    "name": "[v2,3/4] PCI: endpoint: Add API for DOE initialization and setup in EPC core",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "09b8865157f64669c25a792d991dcb9d75703834",
    "submitter": {
        "id": 92467,
        "url": "http://patchwork.ozlabs.org/api/people/92467/?format=api",
        "name": "Aksh Garg",
        "email": "a-garg7@ti.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401073022.215805-4-a-garg7@ti.com/mbox/",
    "series": [
        {
            "id": 498286,
            "url": "http://patchwork.ozlabs.org/api/series/498286/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=498286",
            "date": "2026-04-01T07:30:19",
            "name": "PCI: Add DOE support for endpoint",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/498286/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218407/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218407/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51650-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=ti.com header.i=@ti.com header.a=rsa-sha256\n header.s=selector1 header.b=cqh+fBLI;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-51650-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=\"cqh+fBLI\"",
            "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=40.93.194.56",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=ti.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=ti.com"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4flxfq3057z1yGH\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 18:38:11 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 3CFBB311B83B\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Apr 2026 07:34:08 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 1C9A639A077;\n\tWed,  1 Apr 2026 07:30:56 +0000 (UTC)",
            "from SN4PR0501CU005.outbound.protection.outlook.com\n (mail-southcentralusazon11011056.outbound.protection.outlook.com\n [40.93.194.56])\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 09288398904;\n\tWed,  1 Apr 2026 07:30:52 +0000 (UTC)",
            "from BL1P223CA0001.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:2c4::6)\n by SJ0PR10MB5663.namprd10.prod.outlook.com (2603:10b6:a03:3db::21) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.28; Wed, 1 Apr\n 2026 07:30:50 +0000",
            "from BL02EPF00021F68.namprd02.prod.outlook.com\n (2603:10b6:208:2c4:cafe::23) by BL1P223CA0001.outlook.office365.com\n (2603:10b6:208:2c4::6) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.30 via Frontend Transport; Wed,\n 1 Apr 2026 07:30:52 +0000",
            "from flwvzet201.ext.ti.com (198.47.21.195) by\n BL02EPF00021F68.mail.protection.outlook.com (10.167.249.4) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9769.17 via Frontend Transport; Wed, 1 Apr 2026 07:30:47 +0000",
            "from DFLE207.ent.ti.com (10.64.6.65) by flwvzet201.ext.ti.com\n (10.248.192.32) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Wed, 1 Apr\n 2026 02:30:43 -0500",
            "from DFLE205.ent.ti.com (10.64.6.63) by DFLE207.ent.ti.com\n (10.64.6.65) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Wed, 1 Apr\n 2026 02:30:42 -0500",
            "from lelvem-mr06.itg.ti.com (10.180.75.8) by DFLE205.ent.ti.com\n (10.64.6.63) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend\n Transport; Wed, 1 Apr 2026 02:30:42 -0500",
            "from a0507033-hp.dhcp.ti.com (a0507033-hp.dhcp.ti.com\n [172.24.231.225])\n\tby lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 6317UN3S3832504;\n\tWed, 1 Apr 2026 02:30:38 -0500"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775028656; cv=fail;\n b=FC0lkeSXW8U6BIoZ8cFO8Fa14q+baOQFrDj78sdQFa80IDifd18VJ2TOLQMboBFhZ8Lxark75hR1KcYObvuyoScmaUkspYGCiWhJLQWHpIAPfL/eRD3w0da3q2hoW+pyeEgk/a6e9z246cdZNqPfEmJzqHuUzOkuhL533imijlU=",
            "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=DKKAiO33B9rSJWSdQhT8l88jrc7N33ZJEocIUEwQgC5eujkybyAKVPCXSBh+Y5a0QxDniGsnrNxGHpTPTTY0xqZX+vU63VuKrmnb1aqShmfbsW1VgHYMcEiFYo3NyGdRHE9tzheQ/2Utvd8664yy4I2DOGvTV05SjpgIvq9KFhqQh/rXGLYCqKlyfdt9tLEM9OnIhAx1C4V01xRKWq7J21IQTcucUUQsBMX+T7Ffc84tpsG4exKP8qe2uGzdo/de7huxo81/S34EVk0/jbPT1V1LSU6Yio3RSs3oe/Kjjsi6+du24JeULcFU0lzJVFETRsm6NvJaeUvhzAp2LpwBww=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775028656; c=relaxed/simple;\n\tbh=qaGRda44yb7zWAtrGphW2mY1sqlvMrXAAeYvF4T2S7Y=;\n\th=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=DipoBRcT9BTbtnFTb5sT/OWScfPwGgVTE4zM8RIEBCVveO9/+Mdfsy31zSURXLOMbNQjc2JYrOf1Ds5bfr87w0Qf/4vaKeX/MghjZIHUhnj8XRhDP/pGtCVXF/UJCDzk3Os6gpyRd/qNXoL1+/z6T7y6eNiB4oU45BNe6guv+8w=",
            "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=p+2nVL+oNEhLJODV/d5g6MEA/ciHlVTCNd0iT3/WNeQ=;\n b=uHrHqiRPSFCk9YqtDbnaAUeaHcDr/z3zfQ8hRO/YRkM0Nkjpzy/aV1eIZOhorZCb0Y3CALfdy2ZTKIclcd1l4xgcuRcUwMONHK0C5gvHMGrVyUt2Q/1+dIcrCLGaASJ8mWAgaVFRt8oJMOsQtybc+Dsq/qLKeq8gG8OUPVBz8q+CiOKocnAT4dhK7TyJQYNzrDS7ZxM5B7vjr4V4c5S+rXP2VsWSbX8Z7Wm91bNvQp+dnuZsyg6AWzkqjTNeg69ZFVrb7mxe3mvUo+CkgCDpXQCsByelEryssOndYGUGH3Rk6C7urUeE1ohZW5KjL+FIzW/cBeuDdWUEq8/nMBFJ4w=="
        ],
        "ARC-Authentication-Results": [
            "i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=ti.com;\n spf=pass smtp.mailfrom=ti.com;\n dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=cqh+fBLI;\n arc=fail smtp.client-ip=40.93.194.56",
            "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 198.47.21.195) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=ti.com;\n dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=ti.com;\n dkim=none (message not signed); arc=none (0)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=p+2nVL+oNEhLJODV/d5g6MEA/ciHlVTCNd0iT3/WNeQ=;\n b=cqh+fBLI3lwEG3mawvx+RtFPUIZFcH9xV8c6rtzAkrOAvL5CSwWdcWRsO5g6jIbcHtkrbngQfix5y33vsd3Rp7/lpPsnKj4o4KwamDcgr3El0lK5cA+/jp2CPKrfzePatGc+nIzBU2xsbi80+Eg8/yMrE+ErE3b6fFukRvCJJ5s=",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 198.47.21.195)\n smtp.mailfrom=ti.com; dkim=none (message not signed) header.d=none;dmarc=pass\n action=none header.from=ti.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of ti.com designates\n 198.47.21.195 as permitted sender) receiver=protection.outlook.com;\n client-ip=198.47.21.195; helo=flwvzet201.ext.ti.com; pr=C",
        "From": "Aksh Garg <a-garg7@ti.com>",
        "To": "<linux-pci@vger.kernel.org>, <linux-doc@vger.kernel.org>,\n\t<mani@kernel.org>, <kwilczynski@kernel.org>, <bhelgaas@google.com>,\n\t<corbet@lwn.net>, <kishon@kernel.org>, <skhan@linuxfoundation.org>,\n\t<lukas@wunner.de>, <cassel@kernel.org>, <alistair@alistair23.me>",
        "CC": "<linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>,\n\t<s-vadapalli@ti.com>, <danishanwar@ti.com>, <srk@ti.com>, <a-garg7@ti.com>",
        "Subject": "[PATCH v2 3/4] PCI: endpoint: Add API for DOE initialization and\n setup in EPC core",
        "Date": "Wed, 1 Apr 2026 13:00:21 +0530",
        "Message-ID": "<20260401073022.215805-4-a-garg7@ti.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20260401073022.215805-1-a-garg7@ti.com>",
        "References": "<20260401073022.215805-1-a-garg7@ti.com>",
        "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",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-C2ProcessedOrg": "333ef613-75bf-4e12-a4b1-8e3623f5dcea",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-TrafficTypeDiagnostic": "BL02EPF00021F68:EE_|SJ0PR10MB5663:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "ff52b391-d837-4e75-77a0-08de8fc097fe",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|7416014|376014|36860700016|82310400026|1800799024|921020|18002099003|22082099003|56012099003;",
        "X-Microsoft-Antispam-Message-Info": "\n\td7qWoi4qjfygrTUtlRMgyRW0QDv7rNt+sM/KqzqEajxg93a8Ai4c7Mu8bXy6P9PpbkLeWpjXYFv+K2t2t7V3obntYutgsGFYueY4TafFFSVhm+FWA7bi67MrVce8R6+PCr2nHgbnoVQlWgdk89jId+PAVcGtpPCWlc7GbAdEI7kioH+276Ka/bmBBjKuWovwOnAyaKABpI9rLmPDZncVd+vokdaOwDHMt86phIDpm/NQlc4nFmpmoT4nzLGdzPLmUovQ/x56/4PwQJ9/f3LNYIwXEPQ3cgLvUJnghIJv4Jc3MKwRukW4dp6n9InLdyyegiajd4+wc+xDuDmz+fOhdbqmFuVGh57C92LSxCKH5uOcSECxCOcccQPs9UZQzLhU5B2BgzuY19d62rWHmwzH8wWxnUK+FrqjGxafmw8z3N4P/jZdwmu598MCGE3/1iw/l5PrAT0P3SWAhHOKXzcPjBca5TeJuirRfHkrglJsnaWnT4aPjIxq0oS/IqubP8Q/OhzSiWEWFT4NTwfuqhV72FTWz7bPgVyZsmlG79S+y5+rHrH99py/5l6giuOFvYl6XMt4CeTfrecB2cfBBvY0MLSZkydS6RaeU/kgnX88MWRu9lqL+GiO+26HBcvE8vM1w0tpIi93rd/kLCBoqPf2UTxwRxhGjnWvZJAT6F4jlgYK2bpdCU+Kav2FdEdhINzwI1mS8UziWJpvl1Ov7pE4r2AkMRD26PQCMTC6oXx7b04Fk5CjknIcZSkDtGCIwX1kzMpWGqWvYbhdc/PQvC/skOjlrx/ebLkoV1aEbgfZYrsFYOUHNV3gCg0Bzzd0afS0",
        "X-Forefront-Antispam-Report": "\n\tCIP:198.47.21.195;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:flwvzet201.ext.ti.com;PTR:ErrorRetry;CAT:NONE;SFS:(13230040)(7416014)(376014)(36860700016)(82310400026)(1800799024)(921020)(18002099003)(22082099003)(56012099003);DIR:OUT;SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n\txlsUEPXZS7o3gmQ+21Zmpc3il7VohY29DugOeE1u19YspzMXPbwfizG9D8bmjqKIBqFrWSGGDidEN67cthcYm6f7xpIHZ36oAiMceAR+hsKI5p2tXrDeQmlwU37PtDmWCFGm7+biXcb0ndTQ3tFjMeN7NdWg2Iz3nc5WS64ql4lP5cnc2UIyrUQuYCe8AgApiqUVXgLKvE9x91x1oYVKDbyJL+kt38VxRvCGuxM7rDR7IAyMkhJB7Ima6QjWIuKZaH4Va4AE996gFl9FJ/evz8tnaJvM6mJoYd0sg+0EDA4XjJkCGFTcxm91jGP0t1hmSHoZFEiD4bkicdw030sT36PnV4ja6dvIsiRLuinxCnqpwMCQvaWdWsnFsXoU9nlsLBTugRPO6xm4jxHhmalKR/tSpIdP7SCFwqTN1lHPE3vPzNbzAis3QpKqVd8rnJ3E",
        "X-OriginatorOrg": "ti.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "01 Apr 2026 07:30:47.8566\n (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n ff52b391-d837-4e75-77a0-08de8fc097fe",
        "X-MS-Exchange-CrossTenant-Id": "e5b49634-450b-4709-8abb-1e2b19b982b7",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=e5b49634-450b-4709-8abb-1e2b19b982b7;Ip=[198.47.21.195];Helo=[flwvzet201.ext.ti.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n\tBL02EPF00021F68.namprd02.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SJ0PR10MB5663"
    },
    "content": "Add pci_epc_setup_doe() API in EPC core driver to initialize and setup\nthe DOE framework for an endpoint controller. The API discovers the DOE\ncapabilities (extended capability ID 0x2E), and registers each discovered\nDOE mailbox for all the functions in the endpoint controller. This API\nshould be invoked by the controller driver during probe based on the\ndoe_capable feature.\n\nAdd pci_epc_destroy_doe() API in EPC core driver for cleanup of DOE\nresources, which should be invoked by the controller driver during\ncontroller cleanup based on the doe_capable feature.\n\nCo-developed-by: Siddharth Vadapalli <s-vadapalli@ti.com>\nSigned-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>\nSigned-off-by: Aksh Garg <a-garg7@ti.com>\n---\n\nChanges since v1:\n- New patch added to v2 (not in v1)\n\nThis patch is introduced based on the feedback provided by Manivannan\nSadhasivam at [1].\n\n[1]: https://lore.kernel.org/all/p57x6jleaim5w7t2k3v7tioujnaxuovfpj5euop5ogefvw23se@y5fw3che5p5d/\n\n drivers/pci/endpoint/pci-epc-core.c | 71 +++++++++++++++++++++++++++++\n include/linux/pci-epc.h             | 21 +++++++++\n 2 files changed, 92 insertions(+)",
    "diff": "diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c\nindex e546b3dbb240..14f77dd0877b 100644\n--- a/drivers/pci/endpoint/pci-epc-core.c\n+++ b/drivers/pci/endpoint/pci-epc-core.c\n@@ -14,6 +14,8 @@\n #include <linux/pci-epf.h>\n #include <linux/pci-ep-cfs.h>\n \n+#include \"../pci.h\"\n+\n static const struct class pci_epc_class = {\n \t.name = \"pci_epc\",\n };\n@@ -547,6 +549,75 @@ void pci_epc_mem_unmap(struct pci_epc *epc, u8 func_no, u8 vfunc_no,\n }\n EXPORT_SYMBOL_GPL(pci_epc_mem_unmap);\n \n+/**\n+ * pci_epc_doe_setup() - Setup and discover DOE mailboxes for all functions\n+ * @epc: the EPC device on which DOE mailboxes has to be setup\n+ *\n+ * Discover DOE (Data Object Exchange) capabilities for all physical functions\n+ * in the endpoint controller and register DOE mailboxes.\n+ *\n+ * This API should be called by the controller driver during initialization\n+ * if DOE support is available (indicated by doe_capable in pci_epc_features).\n+ *\n+ * RETURNS: 0 on success, -errno on failure\n+ */\n+int pci_epc_doe_setup(struct pci_epc *epc)\n+{\n+\tu16 cap_offset = 0;\n+\tu8 func_no;\n+\tint ret;\n+\n+\tif (!epc || !epc->ops || !epc->ops->find_ext_capability)\n+\t\treturn -EINVAL;\n+\n+\t/* Initialize DOE framework for this controller */\n+\tret = pci_ep_doe_init(epc);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\t/* Discover DOE capabilities for all functions */\n+\tfor (func_no = 0; func_no < epc->max_functions; func_no++) {\n+\t\twhile ((cap_offset = epc->ops->find_ext_capability(epc, func_no, 0,\n+\t\t\t\t\t\t\t\t   cap_offset,\n+\t\t\t\t\t\t\t\t   PCI_EXT_CAP_ID_DOE))) {\n+\t\t\t/* Register this DOE mailbox */\n+\t\t\tret = pci_ep_doe_add_mailbox(epc, func_no, cap_offset);\n+\t\t\tif (ret) {\n+\t\t\t\tdev_err(&epc->dev,\n+\t\t\t\t\t\"[pf%d:offset %x] failed to add DOE mailbox\\n\",\n+\t\t\t\t\tfunc_no, cap_offset);\n+\t\t\t}\n+\t\t}\n+\t}\n+\n+\tdev_dbg(&epc->dev, \"DOE mailboxes setup complete\\n\");\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(pci_epc_doe_setup);\n+\n+/**\n+ * pci_epc_doe_destroy() - Destroy and cleanup DOE mailboxes\n+ * @epc: the EPC device on which DOE mailboxes has to be destroyed\n+ *\n+ * Destroy all DOE mailboxes registered on this endpoint controller and\n+ * free associated resources.\n+ *\n+ * This API should be called by the controller driver during controller cleanup\n+ * if DOE support is available (indicated by doe_capable in pci_epc_features).\n+ *\n+ * RETURNS: 0 on success, -errno on failure\n+ */\n+int pci_epc_doe_destroy(struct pci_epc *epc)\n+{\n+\tif (!epc)\n+\t\treturn -EINVAL;\n+\n+\tpci_ep_doe_destroy(epc);\n+\tdev_dbg(&epc->dev, \"DOE mailboxes destroyed\\n\");\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(pci_epc_doe_destroy);\n+\n /**\n  * pci_epc_clear_bar() - reset the BAR\n  * @epc: the EPC device for which the BAR has to be cleared\ndiff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h\nindex cfe74585be4c..07fa41a8e466 100644\n--- a/include/linux/pci-epc.h\n+++ b/include/linux/pci-epc.h\n@@ -84,6 +84,8 @@ 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+ * @find_ext_capability: ops to find extended capability offset for a function\n+ *\t\t\t in endpoint controller\n  * @owner: the module owner containing the ops\n  */\n struct pci_epc_ops {\n@@ -115,6 +117,8 @@ 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+\tu16\t(*find_ext_capability)(struct pci_epc *epc, u8 func_no,\n+\t\t\t\t       u8 vfunc_no, u16 start, u8 cap);\n \tstruct module *owner;\n };\n \n@@ -236,6 +240,7 @@ struct pci_epc_bar_desc {\n  * @msi_capable: indicate if the endpoint function has MSI capability\n  * @msix_capable: indicate if the endpoint function has MSI-X capability\n  * @intx_capable: indicate if the endpoint can raise INTx interrupts\n+ * @doe_capable: indicate if the endpoint function has DOE capability\n  * @bar: array specifying the hardware description for each BAR\n  * @align: alignment size required for BAR buffer allocation\n  */\n@@ -246,6 +251,7 @@ struct pci_epc_features {\n \tunsigned int\tmsi_capable : 1;\n \tunsigned int\tmsix_capable : 1;\n \tunsigned int\tintx_capable : 1;\n+\tunsigned int\tdoe_capable : 1;\n \tstruct\tpci_epc_bar_desc bar[PCI_STD_NUM_BARS];\n \tsize_t\talign;\n };\n@@ -334,6 +340,21 @@ int pci_epc_mem_map(struct pci_epc *epc, u8 func_no, u8 vfunc_no,\n void pci_epc_mem_unmap(struct pci_epc *epc, u8 func_no, u8 vfunc_no,\n \t\t       struct pci_epc_map *map);\n \n+#ifdef CONFIG_PCI_ENDPOINT_DOE\n+int pci_epc_doe_setup(struct pci_epc *epc);\n+int pci_epc_doe_destroy(struct pci_epc *epc);\n+#else\n+static inline int pci_epc_doe_setup(struct pci_epc *epc)\n+{\n+\treturn -EOPNOTSUPP;\n+}\n+\n+static inline int pci_epc_doe_destroy(struct pci_epc *epc)\n+{\n+\treturn -EOPNOTSUPP;\n+}\n+#endif\n+\n #else\n static inline void pci_epc_init_notify(struct pci_epc *epc)\n {\n",
    "prefixes": [
        "v2",
        "3/4"
    ]
}