Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2197403/?format=api
{ "id": 2197403, "url": "http://patchwork.ozlabs.org/api/patches/2197403/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260217212707.2450423-15-cassel@kernel.org/", "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": "<20260217212707.2450423-15-cassel@kernel.org>", "list_archive_url": null, "date": "2026-02-17T21:27:10", "name": "[4/9] PCI: endpoint: Introduce pci_epc_bar_type BAR_DISABLED", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "3eb3aae9f5e0ab3f28622e8d80c1284b65e62142", "submitter": { "id": 87751, "url": "http://patchwork.ozlabs.org/api/people/87751/?format=api", "name": "Niklas Cassel", "email": "cassel@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260217212707.2450423-15-cassel@kernel.org/mbox/", "series": [ { "id": 492482, "url": "http://patchwork.ozlabs.org/api/series/492482/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=492482", "date": "2026-02-17T21:27:06", "name": "PCI: endpoint differentiate between disabled and reserved BARs", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/492482/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2197403/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197403/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-47511-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 (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=D6MvK2id;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-47511-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"D6MvK2id\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\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 4fFt6l0Jzlz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 18 Feb 2026 08:28:31 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id BB970301D324\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 21:27:55 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 4CDF82DC357;\n\tTue, 17 Feb 2026 21:27:55 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\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 2A06928C006\n\tfor <linux-pci@vger.kernel.org>; Tue, 17 Feb 2026 21:27:54 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id CAF9EC4CEF7;\n\tTue, 17 Feb 2026 21:27:52 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771363675; cv=none;\n b=LjkVKbrbRJfAF9hrHLjbhy+/bFhlDOGVKU1g9ftVJODGRoW3X8MlM3NupbX1FO3h9tdXlWNCAT49fW2uqiBdOfLZURsBYwSc68H3AQJRt5rVxYEMe0CSaqr+0+Z3aUEBOae37H3zKuq4nitqndF/XhVFMbb4tZtPqy6KXTQs9T8=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771363675; c=relaxed/simple;\n\tbh=iqhVvvUTepr/0ALGjPuaZLxc0bdqFow1MUHNKVF6XjY=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=m/1DEZTyZUiCrnavg7ur8/reucupiIW/BPFTg3QQJuyqggIS5PDgfMWWAoO2OgBjOgpqLKA0+JBBI3H9q6stq4ew/fDW9SyhQpUqXXbpF0AofY3wgGq7avVFPvhL9bvh+HI81zubX3i6VcfxmhTPjM+WtQRbr/RjkqHo4Ye+5b0=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=D6MvK2id; arc=none smtp.client-ip=10.30.226.201", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1771363674;\n\tbh=iqhVvvUTepr/0ALGjPuaZLxc0bdqFow1MUHNKVF6XjY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=D6MvK2idLamtxGg8dO8scLvhrvZdl0Ks/Fl+gnDOcaTjlJbvbzLwMMlhbd9hTPo9X\n\t wVZldKfM4iIsR+DBftuGNKym/e2VGxfqP7aMlDA8xAsYDRUS92REpArFut2nPKXA5u\n\t 2QCDkwSfXAJTk5iS7/41XCZj0rqvx7JYrU7g6s3mWUiXiWo5OOULAiy+Ub9aVdLj+O\n\t Nd/YWLCt7KeMthJbIsxer/kqMrRbe26jH5o+7TqpQYGcw4gs6ovaqsPE9lrKUlq4Mc\n\t T+yXhz93R8/xL6ORNd8zG9bBBzkdHbwVuwmFvPyT4Ub6hdyKoTVgbJw9sEKv9+S7TR\n\t gI2cRXLaGaJ6g==", "From": "Niklas Cassel <cassel@kernel.org>", "To": "Manivannan Sadhasivam <mani@kernel.org>, =?utf-8?q?Krzysztof_Wilczy?=\n\t=?utf-8?q?=C5=84ski?= <kwilczynski@kernel.org>,\n Kishon Vijay Abraham I <kishon@kernel.org>,\n Bjorn Helgaas <bhelgaas@google.com>", "Cc": "Manikanta Maddireddy <mmaddireddy@nvidia.com>,\n\tKoichiro Den <den@valinux.co.jp>,\n\tDamien Le Moal <dlemoal@kernel.org>,\n\tNiklas Cassel <cassel@kernel.org>,\n\tlinux-pci@vger.kernel.org", "Subject": "[PATCH 4/9] PCI: endpoint: Introduce pci_epc_bar_type BAR_DISABLED", "Date": "Tue, 17 Feb 2026 22:27:10 +0100", "Message-ID": "<20260217212707.2450423-15-cassel@kernel.org>", "X-Mailer": "git-send-email 2.53.0", "In-Reply-To": "<20260217212707.2450423-11-cassel@kernel.org>", "References": "<20260217212707.2450423-11-cassel@kernel.org>", "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-Developer-Signature": "v=1; a=openpgp-sha256; l=2984; i=cassel@kernel.org;\n h=from:subject; bh=iqhVvvUTepr/0ALGjPuaZLxc0bdqFow1MUHNKVF6XjY=;\n b=owGbwMvMwCV2MsVw8cxjvkWMp9WSGDKn3NWbdSV94/rqSgvjhd9YjN6w8UU9vaZhvnvR7oUVZ\n nGqGxL9OkpZGMS4GGTFFFl8f7jsL+52n3Jc8Y4NzBxWJpAhDFycAjARx68M/6w2RSzfunpXmd3r\n tYY9TpuVYo/K/lcxbYvibfiYd5R5yVeG/25HtZ3vM2S9+PDa+aujgKe+74bpHlWrH/zszkizr+I\n S5wIA", "X-Developer-Key": "i=cassel@kernel.org; a=openpgp;\n fpr=5ADE635C0E631CBBD5BE065A352FE6582ED9B5DA", "Content-Transfer-Encoding": "8bit" }, "content": "Add a pci_epc_bar_type BAR_64BIT_UPPER to more clearly differentiate\nBAR_DISABLED from BAR_RESERVED.\n\nThis BAR type will only be used for a BAR that the EPC driver should\ndisable. (Unlike a BAR_RESERVED, which is still enabled.)\n\nCo-developed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>\nSigned-off-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>\nSigned-off-by: Niklas Cassel <cassel@kernel.org>\n---\n drivers/pci/endpoint/pci-epc-core.c | 5 +++--\n include/linux/pci-epc.h | 12 ++++++++++--\n 2 files changed, 13 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c\nindex 8de321e1c342..5045e22367cf 100644\n--- a/drivers/pci/endpoint/pci-epc-core.c\n+++ b/drivers/pci/endpoint/pci-epc-core.c\n@@ -103,9 +103,10 @@ enum pci_barno pci_epc_get_next_free_bar(const struct pci_epc_features\n \t\tbar++;\n \n \tfor (i = bar; i < PCI_STD_NUM_BARS; i++) {\n-\t\t/* If the BAR is not reserved, return it. */\n+\t\t/* If the BAR is not reserved or disabled, return it. */\n \t\tif (epc_features->bar[i].type != BAR_RESERVED &&\n-\t\t epc_features->bar[i].type != BAR_64BIT_UPPER)\n+\t\t epc_features->bar[i].type != BAR_64BIT_UPPER &&\n+\t\t epc_features->bar[i].type != BAR_DISABLED)\n \t\t\treturn i;\n \t}\n \ndiff --git a/include/linux/pci-epc.h b/include/linux/pci-epc.h\nindex f7f48f43d370..8687b9c3462b 100644\n--- a/include/linux/pci-epc.h\n+++ b/include/linux/pci-epc.h\n@@ -191,7 +191,14 @@ struct pci_epc {\n * @BAR_RESIZABLE: The BAR implements the PCI-SIG Resizable BAR Capability.\n *\t\t NOTE: An EPC driver can currently only set a single supported\n *\t\t size.\n- * @BAR_RESERVED: The BAR should not be touched by an EPF driver.\n+ * @BAR_RESERVED: Used for HW-backed BARs (e.g. MSI-X table, DMA regs). The BAR\n+ *\t\t should not be disabled an EPC driver. The BAR should not be\n+ *\t\t reprogrammed by an EPF driver. An EPF driver is allowed to\n+ *\t\t disable the BAR if absolutely necessary. (However, right now\n+ *\t\t there is no EPC operation to disable a BAR that has not been\n+ *\t\t programmed using pci_epc_set_bar().)\n+ * @BAR_DISABLED: The BAR should be disabled by an EPC driver. The BAR will be\n+ *\t\t unavailable to an EPF driver.\n * @BAR_64BIT_UPPER: Should only be set on a BAR if the preceding BAR is marked\n *\t\t as only_64bit.\n */\n@@ -200,6 +207,7 @@ enum pci_epc_bar_type {\n \tBAR_FIXED,\n \tBAR_RESIZABLE,\n \tBAR_RESERVED,\n+\tBAR_DISABLED,\n \tBAR_64BIT_UPPER,\n };\n \n@@ -238,7 +246,7 @@ struct pci_epc_bar_rsvd_region {\n *\n *\t\tonly_64bit should not be set on a BAR of type BAR_RESERVED.\n *\t\t(If BARx is a 64-bit BAR that an EPF driver is not allowed to\n- *\t\ttouch, then both BARx and BARx+1 must be set to type\n+ *\t\treprogram, then both BARx and BARx+1 must be set to type\n *\t\tBAR_RESERVED.)\n * @nr_rsvd_regions: number of fixed subregions described for BAR_RESERVED\n * @rsvd_regions: fixed subregions behind BAR_RESERVED\n", "prefixes": [ "4/9" ] }