get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2224499,
    "url": "http://patchwork.ozlabs.org/api/patches/2224499/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/666cac19b5daa0ab0e0ab64454e76b4d24465dbd.1776429882.git.mnencia@kcore.it/",
    "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": "<666cac19b5daa0ab0e0ab64454e76b4d24465dbd.1776429882.git.mnencia@kcore.it>",
    "list_archive_url": null,
    "date": "2026-04-17T13:24:36",
    "name": "[v2,1/2] PCI: Skip Resizable BAR restore on read error",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "999ff85bc762a7abace4a641243af89ee9e992cf",
    "submitter": {
        "id": 93088,
        "url": "http://patchwork.ozlabs.org/api/people/93088/?format=api",
        "name": "Marco Nenciarini",
        "email": "mnencia@kcore.it"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/666cac19b5daa0ab0e0ab64454e76b4d24465dbd.1776429882.git.mnencia@kcore.it/mbox/",
    "series": [
        {
            "id": 500338,
            "url": "http://patchwork.ozlabs.org/api/series/500338/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=500338",
            "date": "2026-04-17T13:24:35",
            "name": "PCI: Guard Resizable BAR restore against unreachable devices",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/500338/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2224499/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2224499/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-52724-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=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=kcore.it header.i=@kcore.it header.a=rsa-sha256\n header.s=spark header.b=paSCx3Cw;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=104.64.211.4; helo=sin.lore.kernel.org;\n envelope-from=linux-pci+bounces-52724-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=kcore.it header.i=@kcore.it header.b=\"paSCx3Cw\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=49.13.27.68",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=kcore.it",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=kcore.it"
        ],
        "Received": [
            "from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])\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 4fxwc268qGz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 23:25:22 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id B0DD33028009\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 13:24:55 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id E864A2949E0;\n\tFri, 17 Apr 2026 13:24:48 +0000 (UTC)",
            "from spark.kcore.it (spark.kcore.it [49.13.27.68])\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 94ED73A16A7;\n\tFri, 17 Apr 2026 13:24:47 +0000 (UTC)",
            "from mnencia by spark.kcore.it with local (Exim 4.96)\n\t(envelope-from <mnencia@kcore.it>)\n\tid 1wDjBV-007w6F-1D;\n\tFri, 17 Apr 2026 15:24:37 +0200"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776432288; cv=none;\n b=KXiVdPaZz07wdbyRUzrFd2hhdyR6Je+E1GUfJ0Wv6rOcDZUSxwv9QiAH/Tbrsk2/0v1NnwdpVkhRJgr2IUC42bRMtQzxEIOY2mxK3hdws1KjUFz55Mxps6dbLq3Ca/ckBWoDLlHdOJOpElabQ0HNnQdSiLjux6qSpcfimTDOJeo=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776432288; c=relaxed/simple;\n\tbh=+7NpdMmWYEM3q5sy9cxgH2ACar+KhMk8tlirwg5hLUg=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=eUYE76PDHKTNXRCx/Dm0lOMDAbExd2GcDU91KJIf/c2mvQvbfzDOgL7Tm92rkEYY9hkWTxX7r4XVPTbmzCI8KJUOaDFljbaUsU8g164SBvgYrLQS8pdpmbIkk7ukZrPCxVaMgl8pap30UlLmF0YomD23JETp8uD0sZYzSpKQM1E=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=kcore.it;\n spf=pass smtp.mailfrom=kcore.it;\n dkim=pass (1024-bit key) header.d=kcore.it header.i=@kcore.it\n header.b=paSCx3Cw; arc=none smtp.client-ip=49.13.27.68",
        "DKIM-Signature": "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kcore.it;\n\ts=spark; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:\n\tIn-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=pSYcOdNIP33VlmJbr9B6GAXWdNfuxXFHPUxe73o1NEc=; b=paSCx3CwSZyCSfmYCZ82bVLLsm\n\t0NoeMqU92U9GJCrcflhl/sLEQ1fqcX/C9W/YyHUDlp5EwOWgqNdggjIpZNbOR2gh91jhGLH6wGb8t\n\tuK8MVk4rX0hgkI1ZAHhzKukhLcqflxGx9mD/fWDZ/cbyxtw87PCx8Q/bNG1/0LqsLQCE=;",
        "From": "Marco Nenciarini <mnencia@kcore.it>",
        "To": "Bjorn Helgaas <bhelgaas@google.com>,\n\tlinux-pci@vger.kernel.org",
        "Cc": "linux-kernel@vger.kernel.org,\n =?utf-8?q?Christian_K=C3=B6nig?= <ckoenig.leichtzumerken@gmail.com>,\n Marco Nenciarini <mnencia@kcore.it>, stable@vger.kernel.org, =?utf-8?q?Mich?=\n\t=?utf-8?q?a=C5=82_Winiarski?= <michal.winiarski@intel.com>, =?utf-8?q?Ilpo_?=\n\t=?utf-8?q?J=C3=A4rvinen?= <ilpo.jarvinen@linux.intel.com>,\n \"Rafael J . Wysocki\" <rafael@kernel.org>,\n Eric Chanudet <echanude@redhat.com>, Alex Williamson <alex@shazbot.org>,\n Lukas Wunner <lukas@wunner.de>",
        "Subject": "[PATCH v2 1/2] PCI: Skip Resizable BAR restore on read error",
        "Date": "Fri, 17 Apr 2026 15:24:36 +0200",
        "Message-Id": "\n <666cac19b5daa0ab0e0ab64454e76b4d24465dbd.1776429882.git.mnencia@kcore.it>",
        "X-Mailer": "git-send-email 2.39.5",
        "In-Reply-To": "<cover.1776429882.git.mnencia@kcore.it>",
        "References": "<20260408163922.1740497-1-mnencia@kcore.it>\n <cover.1776429882.git.mnencia@kcore.it>",
        "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-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "pci_restore_rebar_state() uses the Resizable BAR Control register to\ndecide how many BARs to restore (nbars) and which BAR each iteration\naddresses (bar_idx).\n\nWhen the device does not respond, config reads return the all-ones\npattern. Both fields are 3 bits wide, so nbars and bar_idx both\nevaluate to 7, past the spec's valid ranges for both fields.\npci_resource_n() then returns an unrelated resource slot, whose\nsize is used to derive a nonsensical value written back to the\nResizable BAR Control register.\n\nBail out if any Resizable BAR Control read returns the error\npattern. No further BARs are touched, which is safe because a\nconfig read that returns the error pattern indicates the device is\nunreachable and restoration is pointless.\n\nFixes: d3252ace0bc6 (\"PCI: Restore resized BAR state on resume\")\nCc: stable@vger.kernel.org\nSigned-off-by: Marco Nenciarini <mnencia@kcore.it>\n---\nCc: Michał Winiarski <michal.winiarski@intel.com>\nCc: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>\nCc: Rafael J. Wysocki <rafael@kernel.org>\nCc: Eric Chanudet <echanude@redhat.com>\nCc: Alex Williamson <alex@shazbot.org>\nCc: Lukas Wunner <lukas@wunner.de>\n\n drivers/pci/rebar.c | 6 ++++++\n 1 file changed, 6 insertions(+)",
    "diff": "diff --git a/drivers/pci/rebar.c b/drivers/pci/rebar.c\nindex 39f8cf3b70d57..11965947c4cb5 100644\n--- a/drivers/pci/rebar.c\n+++ b/drivers/pci/rebar.c\n@@ -231,6 +231,9 @@ void pci_restore_rebar_state(struct pci_dev *pdev)\n \t\treturn;\n \n \tpci_read_config_dword(pdev, pos + PCI_REBAR_CTRL, &ctrl);\n+\tif (PCI_POSSIBLE_ERROR(ctrl))\n+\t\treturn;\n+\n \tnbars = FIELD_GET(PCI_REBAR_CTRL_NBAR_MASK, ctrl);\n \n \tfor (i = 0; i < nbars; i++, pos += 8) {\n@@ -238,6 +241,9 @@ void pci_restore_rebar_state(struct pci_dev *pdev)\n \t\tint bar_idx, size;\n \n \t\tpci_read_config_dword(pdev, pos + PCI_REBAR_CTRL, &ctrl);\n+\t\tif (PCI_POSSIBLE_ERROR(ctrl))\n+\t\t\treturn;\n+\n \t\tbar_idx = ctrl & PCI_REBAR_CTRL_BAR_IDX;\n \t\tres = pci_resource_n(pdev, bar_idx);\n \t\tsize = pci_rebar_bytes_to_size(resource_size(res));\n",
    "prefixes": [
        "v2",
        "1/2"
    ]
}