Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2197408/?format=api
{ "id": 2197408, "url": "http://patchwork.ozlabs.org/api/patches/2197408/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260217212707.2450423-19-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-19-cassel@kernel.org>", "list_archive_url": null, "date": "2026-02-17T21:27:14", "name": "[8/9] misc: pci_endpoint_test: Give reserved BARs a distinct error code", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "c8a1d62eec8c3ece2e86211dab8cd5cb25bce5be", "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-19-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/2197408/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197408/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-47515-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=rZ4ffOxP;\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-47515-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=\"rZ4ffOxP\"", "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)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fFt7B6Njkz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 18 Feb 2026 08:28:54 +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 0C4BB3032F61\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 17 Feb 2026 21:28:18 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 7CB3728C006;\n\tTue, 17 Feb 2026 21:28:17 +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 5A703271450\n\tfor <linux-pci@vger.kernel.org>; Tue, 17 Feb 2026 21:28:16 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPSA id 797E0C2BC86;\n\tTue, 17 Feb 2026 21:28:14 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771363697; cv=none;\n b=r5Q56RsqwNzeLQQAnnayLaU26voknI3gDCj2rXr8DZRBszqPkALyUR/D2mfMusvpToMwJuIuLMjHqbOKYia0gC1IBSwXXG/+PThiUtns9XO9vANuV1oswNPFSIEwJQDokOwyK6ChvhX6gxGTmX5fwlhympBe4kTUYxftKSkKOvg=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771363697; c=relaxed/simple;\n\tbh=NFw+Agt03b1wTzK1P1urv9xzEn8ld88gw4xziKa1WBY=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=XapL70E9sHpF8FZFS1YZe+9B2FYcAKjGq5/BhcB6dLtErUMMnCpp/5e5Cu8dFvN5XPPyd34mJ7RIHVFXIvK+wXc9GVqLwgSVxWLIVfTnAJO1A4lpylQ+YfeB02DeS1UJXvuncFR2fcL6vRHgyO3mtR3UUtqtcYDOfvt6LK2koTM=", "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=rZ4ffOxP; 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=1771363696;\n\tbh=NFw+Agt03b1wTzK1P1urv9xzEn8ld88gw4xziKa1WBY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=rZ4ffOxPucN8jRimMOEFW7fiGcV+PT8nBplynLlwpSvQ05GFOV03LgYHtftPAosBA\n\t LkprqtRE6LuI4Lta85zAuYEgimDeKwFt/OpvPiiCR89Hx9mHm5QvYmK/dDy0knKtVG\n\t Tkbxr4xtV3YLrHPt1pyOzcwNYXk5nC2IyeiAddRX4BvqyItaOCXhTXdmWjM+rKQkpy\n\t 15f6jhnz/h92IvwNt3SYxdoeUPrfeJFSPHa94Yt7Ywdfde7tSutODuYJ/lkODnALSR\n\t gWpwB9xOiDlx4BWeYuZnRIE4KJTlD71YEWNzYxrSzswTcUFj/BB34QQrT6jsPiKpfU\n\t A/X/KEULKPALg==", "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>, Arnd Bergmann <arnd@arndb.de>,\n Greg Kroah-Hartman <gregkh@linuxfoundation.org>", "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 8/9] misc: pci_endpoint_test: Give reserved BARs a distinct\n error code", "Date": "Tue, 17 Feb 2026 22:27:14 +0100", "Message-ID": "<20260217212707.2450423-19-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=2799; i=cassel@kernel.org;\n h=from:subject; bh=NFw+Agt03b1wTzK1P1urv9xzEn8ld88gw4xziKa1WBY=;\n b=owGbwMvMwCV2MsVw8cxjvkWMp9WSGDKn3DXw+uhUm8MQ+brz1bv8opueRn8mzLrn9C7w2MWNq\n Q0vl3Wu6yhlYRDjYpAVU2Tx/eGyv7jbfcpxxTs2MHNYmUCGMHBxCsBEjjxnZHiWGmnklnj0+qH8\n b18bHB5cfGQ6t3JPiGN5yjP79SYvcmczMvxucHNJ+7zC1FRtUpBYf8TdAM38lubf9/dmny1dcDJ\n uIwsA", "X-Developer-Key": "i=cassel@kernel.org; a=openpgp;\n fpr=5ADE635C0E631CBBD5BE065A352FE6582ED9B5DA", "Content-Transfer-Encoding": "8bit" }, "content": "Give reserved BARs a distinct error code, such that the pci_endpoint_test\nselftest will be able to skip test cases that are run against reserved\nBARs.\n\nSigned-off-by: Niklas Cassel <cassel@kernel.org>\n---\n drivers/misc/pci_endpoint_test.c | 32 ++++++++++++++++++++++++++++++--\n 1 file changed, 30 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c\nindex 74ab5b5b9011..7cffb6e77c4d 100644\n--- a/drivers/misc/pci_endpoint_test.c\n+++ b/drivers/misc/pci_endpoint_test.c\n@@ -84,6 +84,12 @@\n #define CAP_MSIX\t\t\t\tBIT(2)\n #define CAP_INTX\t\t\t\tBIT(3)\n #define CAP_SUBRANGE_MAPPING\t\t\tBIT(4)\n+#define CAP_BAR0_RESERVED\t\t\tBIT(5)\n+#define CAP_BAR1_RESERVED\t\t\tBIT(6)\n+#define CAP_BAR2_RESERVED\t\t\tBIT(7)\n+#define CAP_BAR3_RESERVED\t\t\tBIT(8)\n+#define CAP_BAR4_RESERVED\t\t\tBIT(9)\n+#define CAP_BAR5_RESERVED\t\t\tBIT(10)\n \n #define PCI_ENDPOINT_TEST_DB_BAR\t\t0x34\n #define PCI_ENDPOINT_TEST_DB_OFFSET\t\t0x38\n@@ -275,6 +281,23 @@ static int pci_endpoint_test_request_irq(struct pci_endpoint_test *test)\n \treturn ret;\n }\n \n+static bool bar_is_reserved(struct pci_endpoint_test *test, enum pci_barno bar)\n+{\n+\tif (bar == BAR_0 && test->ep_caps & CAP_BAR0_RESERVED)\n+\t\treturn true;\n+\telse if (bar == BAR_1 && test->ep_caps & CAP_BAR1_RESERVED)\n+\t\treturn true;\n+\telse if (bar == BAR_2 && test->ep_caps & CAP_BAR2_RESERVED)\n+\t\treturn true;\n+\telse if (bar == BAR_3 && test->ep_caps & CAP_BAR3_RESERVED)\n+\t\treturn true;\n+\telse if (bar == BAR_4 && test->ep_caps & CAP_BAR4_RESERVED)\n+\t\treturn true;\n+\telse if (bar == BAR_5 && test->ep_caps & CAP_BAR5_RESERVED)\n+\t\treturn true;\n+\treturn false;\n+}\n+\n static const u32 bar_test_pattern[] = {\n \t0xA0A0A0A0,\n \t0xA1A1A1A1,\n@@ -403,7 +426,7 @@ static int pci_endpoint_test_bars(struct pci_endpoint_test *test)\n \n \t/* Write all BARs in order (without reading). */\n \tfor (bar = 0; bar < PCI_STD_NUM_BARS; bar++)\n-\t\tif (test->bar[bar])\n+\t\tif (test->bar[bar] && !bar_is_reserved(test, bar))\n \t\t\tpci_endpoint_test_bars_write_bar(test, bar);\n \n \t/*\n@@ -413,7 +436,7 @@ static int pci_endpoint_test_bars(struct pci_endpoint_test *test)\n \t * (Reading back the BAR directly after writing can not detect this.)\n \t */\n \tfor (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {\n-\t\tif (test->bar[bar]) {\n+\t\tif (test->bar[bar] && !bar_is_reserved(test, bar)) {\n \t\t\tret = pci_endpoint_test_bars_read_bar(test, bar);\n \t\t\tif (ret)\n \t\t\t\treturn ret;\n@@ -1139,6 +1162,11 @@ static long pci_endpoint_test_ioctl(struct file *file, unsigned int cmd,\n \t\tif (is_am654_pci_dev(pdev) && bar == BAR_0)\n \t\t\tgoto ret;\n \n+\t\tif (bar_is_reserved(test, bar)) {\n+\t\t\tret = -ENOBUFS;\n+\t\t\tgoto ret;\n+\t\t}\n+\n \t\tif (cmd == PCITEST_BAR)\n \t\t\tret = pci_endpoint_test_bar(test, bar);\n \t\telse\n", "prefixes": [ "8/9" ] }