get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2225833,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2225833/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260421163031.704-3-alifm@linux.ibm.com/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260421163031.704-3-alifm@linux.ibm.com>",
    "list_archive_url": null,
    "date": "2026-04-21T16:30:26",
    "name": "[v14,2/7] PCI: Avoid saving config space state if inaccessible",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "dd417dd477b85e14a6e298c0a47a81afb4d136c9",
    "submitter": {
        "id": 73785,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/73785/?format=api",
        "name": "Farhan Ali",
        "email": "alifm@linux.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260421163031.704-3-alifm@linux.ibm.com/mbox/",
    "series": [
        {
            "id": 500852,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/500852/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=500852",
            "date": "2026-04-21T16:30:25",
            "name": "Error recovery for vfio-pci devices on s390x",
            "version": 14,
            "mbox": "http://patchwork.ozlabs.org/series/500852/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2225833/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2225833/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-52855-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=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=W/WcIhA6;\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-52855-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com\n header.b=\"W/WcIhA6\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=148.163.156.1",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=linux.ibm.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 4g0SZh0ZX8z1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 02:33:00 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 853E13061DF3\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 16:30:50 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id DEA243783AA;\n\tTue, 21 Apr 2026 16:30:45 +0000 (UTC)",
            "from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com\n [148.163.156.1])\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 8DCC6282F00;\n\tTue, 21 Apr 2026 16:30:44 +0000 (UTC)",
            "from pps.filterd (m0353729.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63LCB5kG1686243;\n\tTue, 21 Apr 2026 16:30:39 GMT",
            "from ppma23.wdc07v.mail.ibm.com\n (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93])\n\tby mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4dm2j6n8yd-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tTue, 21 Apr 2026 16:30:38 +0000 (GMT)",
            "from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1])\n\tby ppma23.wdc07v.mail.ibm.com (8.18.1.7/8.18.1.7) with ESMTP id\n 63LGKMxO013680;\n\tTue, 21 Apr 2026 16:30:37 GMT",
            "from smtprelay04.wdc07v.mail.ibm.com ([172.16.1.71])\n\tby ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4dmnsh1da2-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tTue, 21 Apr 2026 16:30:37 +0000 (GMT)",
            "from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com\n [10.39.53.230])\n\tby smtprelay04.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 63LGUaGa26411432\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n\tTue, 21 Apr 2026 16:30:36 GMT",
            "from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 0A0425805C;\n\tTue, 21 Apr 2026 16:30:36 +0000 (GMT)",
            "from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id C45955805A;\n\tTue, 21 Apr 2026 16:30:34 +0000 (GMT)",
            "from IBM-D32RQW3.ibm.com (unknown [9.61.248.17])\n\tby smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP;\n\tTue, 21 Apr 2026 16:30:34 +0000 (GMT)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776789045; cv=none;\n b=nOA7XU2mbKp269lwpNyyJLJpQ6IdM6HxE7fls/6vLWgtpVUrHKK4qSjtSb8Wx+Lf72z2gi3LHEBdH0oz2SE7mxhppyjCDlYF0IR5g2+WOqLmCLoA8j3pSIFTDI3X0fkNl+yhgoRXNMs7mxkwvNLCDHhy/woOOo6+gf2u1cA0l6o=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776789045; c=relaxed/simple;\n\tbh=POORsXRkk4nOKnrZRpviXSsULTny9Rnzj8bxogy/6pk=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=QDm4odBoxoa565uxEXu/yIBEfyLongvRYRXx99vTORimP8ClHOw5xP0Lj7jSgek3kcFRkY5ai0iXfsafGIH7WlKZQRfM6tVbKlnWekkyV2LIIh5eiyUtIKwCAJpDX8dq98aPGRJllSMfp4zQRQRgVwHd5ZhdqNx/u2C2gpaKdOY=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com;\n spf=pass smtp.mailfrom=linux.ibm.com;\n dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com\n header.b=W/WcIhA6; arc=none smtp.client-ip=148.163.156.1",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n\t:content-transfer-encoding:date:from:in-reply-to:message-id\n\t:mime-version:references:subject:to; s=pp1; bh=B03ES7Gw4vOtbWqO6\n\tB3bh3UMTVIWbkYsdM5+gP6DaHk=; b=W/WcIhA6K+0j+F0hwt7WEIIBQ1Fx0P/Cy\n\tG382WeLs0WxCMFTnU6qBcHifrHDkLIhiGxBNKzst6OLE+MHyqYfM7BxA10wzlyuY\n\tw5erp4GM2PEx4YQySaP5lwT0pAeLAlWRJolmYC5oTjinABmKUXavoBkWBROhY81/\n\tZaglDfHFvBuPtRExmCvu6astfK1JBKaEcgOiPocDpdR2BiTjpNrKsffwsSvUmmqj\n\t1ARy0ilm7eCtgaMiJhjFsGEEtXfGs2zZCQju+rzYcF1MSgl/VdLqMbRToogyOn9a\n\tGJVJTFec1oCaEeaDjP3FFFDfB1DPB8J65OBQNak4s0G52Ebfo8K2A==",
        "From": "Farhan Ali <alifm@linux.ibm.com>",
        "To": "linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org,\n        linux-pci@vger.kernel.org",
        "Cc": "helgaas@kernel.org, lukas@wunner.de, alex@shazbot.org, clg@redhat.com,\n        alifm@linux.ibm.com, schnelle@linux.ibm.com, mjrosato@linux.ibm.com,\n        Bjorn Helgaas <bhelgaas@google.com>",
        "Subject": "[PATCH v14 2/7] PCI: Avoid saving config space state if inaccessible",
        "Date": "Tue, 21 Apr 2026 09:30:26 -0700",
        "Message-ID": "<20260421163031.704-3-alifm@linux.ibm.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260421163031.704-1-alifm@linux.ibm.com>",
        "References": "<20260421163031.704-1-alifm@linux.ibm.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",
        "X-TM-AS-GCONF": "00",
        "X-Proofpoint-Reinject": "loops=2 maxloops=12",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDIxMDE2MiBTYWx0ZWRfX5ID0gQZzfrcT\n KoleE+upjz1HCMAaJy/ctL1LystcKiUkS7tFG++ICOZSiMJP+0H9OmSLpWE9BPtyMFK5MIWpt2d\n 8JzJ9bcl5Ub8fk02w+WlUDRKVuqcQC9Hxymg4nKgrzZAyMT5KWMR4z82c4mJWXAQBBovfa8Fe2c\n N3+9rPjvlj1h/L0N58JiyhonmQYpowco2jq0Lh2GZEGHNc7tXe7pl7PoOUVZ5ADJlBoIIrkv6Sz\n QDe9LrA2XUPkWUBHDoQ2/pS+jpxPLFQZJuEdjy1mwIpA2+n9w40WQr4I2zZtcma9wZz77Glv8yS\n 489W1mXprZZ7Z7NjCtjGFosCzU0yP9H+ysPKVOdzrqpEPMrLFHX+8bJHJh+Kvtswg8aC5GrnHi7\n JdYxLObPsRjMH2niQne3m5djjfNcjo9bYQcN4cvtBcHi3BdEZvBhrIlmVr+6qFHGAMrir977tJq\n gytunz6JZZ+VfCyCDRw==",
        "X-Proofpoint-GUID": "13SU2rU1PoCGkA2aoMub_GrO7QGX2YVQ",
        "X-Authority-Analysis": "v=2.4 cv=SOJykuvH c=1 sm=1 tr=0 ts=69e7a62e cx=c_pps\n a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=uAbxVGIbfxUO_5tXvNgY:22 a=VnNF1IyMAAAA:8 a=1XWaLZrsAAAA:8\n a=qS04rNcGil1I7-YeviAA:9",
        "X-Proofpoint-ORIG-GUID": "k514EHwisKri4fDL4JeyLjgR8As7lbR1",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-21_03,2026-04-21_02,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n malwarescore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0\n clxscore=1015 phishscore=0 suspectscore=0 adultscore=0 impostorscore=0\n bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound\n adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000\n definitions=main-2604210162"
    },
    "content": "The current reset process saves the device's config space state before\nreset and restores it afterward. However errors may occur unexpectedly and\nit may then be impossible to save config space because the device may be\ninaccessible (e.g. DPC). This results in saving invalid values that get\nwritten back to the device during state restoration.\n\nWith a reset we want to recover/restore the device into a functional state.\nSo avoid saving the state of the config space when the device config space\nis inaccessible.\n\nReviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>\nReviewed-by: Bjorn Helgaas <bhelgaas@google.com>\nSigned-off-by: Farhan Ali <alifm@linux.ibm.com>\n---\n drivers/pci/pci.c | 24 ++++++++++++++++++++++++\n 1 file changed, 24 insertions(+)",
    "diff": "diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c\nindex d0c9f0166af5..e71b81415392 100644\n--- a/drivers/pci/pci.c\n+++ b/drivers/pci/pci.c\n@@ -722,6 +722,27 @@ u16 pci_find_dvsec_capability(struct pci_dev *dev, u16 vendor, u16 dvsec)\n }\n EXPORT_SYMBOL_GPL(pci_find_dvsec_capability);\n \n+static bool pci_dev_config_accessible(struct pci_dev *dev, char *msg)\n+{\n+\tu32 val;\n+\n+\t/*\n+\t * If device's config space is inaccessible it can return ~0 for\n+\t * any reads. Since VFs can also return ~0 for Device and Vendor ID\n+\t * check Command and Status registers. Note that this is racy\n+\t * because the device may become inaccessible partway through\n+\t * next access.\n+\t */\n+\tpci_read_config_dword(dev, PCI_COMMAND, &val);\n+\tif (PCI_POSSIBLE_ERROR(val)) {\n+\t\tpci_warn(dev, \"Device config space inaccessible; unable to %s\\n\",\n+\t\t\t\tmsg);\n+\t\treturn false;\n+\t}\n+\n+\treturn true;\n+}\n+\n /**\n  * pci_find_parent_resource - return resource region of parent bus of given\n  *\t\t\t      region\n@@ -5027,6 +5048,9 @@ static void pci_dev_save_and_disable(struct pci_dev *dev)\n \t */\n \tpci_set_power_state(dev, PCI_D0);\n \n+\tif (!pci_dev_config_accessible(dev, \"save state\"))\n+\t\treturn;\n+\n \tpci_save_state(dev);\n \t/*\n \t * Disable the device by clearing the Command register, except for\n",
    "prefixes": [
        "v14",
        "2/7"
    ]
}