get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2228718,
    "url": "http://patchwork.ozlabs.org/api/patches/2228718/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260427085843.42460-2-fengchengwen@huawei.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": "<20260427085843.42460-2-fengchengwen@huawei.com>",
    "list_archive_url": null,
    "date": "2026-04-27T08:58:38",
    "name": "[v5,1/6] PCI/TPH: Fix pcie_tph_get_st_table_loc() field extraction",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "726db17e7adcf49f7a57e2a7711b3cd3d0ce9676",
    "submitter": {
        "id": 92756,
        "url": "http://patchwork.ozlabs.org/api/people/92756/?format=api",
        "name": "Chengwen Feng",
        "email": "fengchengwen@huawei.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260427085843.42460-2-fengchengwen@huawei.com/mbox/",
    "series": [
        {
            "id": 501609,
            "url": "http://patchwork.ozlabs.org/api/series/501609/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=501609",
            "date": "2026-04-27T08:58:42",
            "name": "vfio/pci: Add PCIe TPH support",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/501609/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2228718/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2228718/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-53209-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=huawei.com header.i=@huawei.com header.a=rsa-sha256\n header.s=dkim header.b=GQ9s0NCQ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-53209-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com\n header.b=\"GQ9s0NCQ\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=113.46.200.220",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=huawei.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=huawei.com"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\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 4g3yJk136mz1yJX\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 19:03:02 +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 B63AC302CB14\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 27 Apr 2026 08:59:08 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 1DA6B37B3FD;\n\tMon, 27 Apr 2026 08:59:00 +0000 (UTC)",
            "from canpmsgout05.his.huawei.com (canpmsgout05.his.huawei.com\n [113.46.200.220])\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 2D31637AA66;\n\tMon, 27 Apr 2026 08:58:58 +0000 (UTC)",
            "from mail.maildlp.com (unknown [172.19.163.104])\n\tby canpmsgout05.his.huawei.com (SkyGuard) with ESMTPS id 4g3y3W3w7Xz12LJC;\n\tMon, 27 Apr 2026 16:51:35 +0800 (CST)",
            "from kwepemk500009.china.huawei.com (unknown [7.202.194.94])\n\tby mail.maildlp.com (Postfix) with ESMTPS id 09DC94048F;\n\tMon, 27 Apr 2026 16:58:50 +0800 (CST)",
            "from localhost.localdomain (10.50.163.32) by\n kwepemk500009.china.huawei.com (7.202.194.94) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1544.11; Mon, 27 Apr 2026 16:58:49 +0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777280340; cv=none;\n b=t0yZZPjuLngjpSgaXonqgzio0R9avb9EFe3b8t0TCwCoHXm4VATEGTaAkW/p2O/AqE5mBLX5am5qkkd74SxLrmfuC6woqDWYzZJv1UxrpY3NC9vq2ndPW2Mq+E2jX+KCN+yHMMAi0+zYTUJspCAZ5UHXzGKuIYqhUHyHrWXHFk4=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777280340; c=relaxed/simple;\n\tbh=mzNyDVhHcwgIp4o8iKfqQgvZHWJoENEGvEu1AWkA9Mo=;\n\th=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=rjqQzwIS64g2J0OEDfnchsWJ5NjnELRfjnOYy5sW4zNbLdWpJfBJJkCbKzpTDgDvqJQGdyCBfBmdfuPoyoi+T+Vr5YbB4TEe1wqL3cyRyeoDjO5JvuPACrSXKVtF1ugh0V/wjqaiCeRfFDiBnYio8UUVbZyhqHKSzilpQ7+KHYo=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=huawei.com;\n spf=pass smtp.mailfrom=huawei.com;\n dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com\n header.b=GQ9s0NCQ; arc=none smtp.client-ip=113.46.200.220",
        "dkim-signature": "v=1; a=rsa-sha256; d=huawei.com; s=dkim;\n\tc=relaxed/relaxed; q=dns/txt;\n\th=From;\n\tbh=7nlljrvCqU78VC/MnyFqbpq9PR/5AYoPcaH4Y7KRztM=;\n\tb=GQ9s0NCQSQxZGlRcvsgaqak7Y0xelQ6OKl4WQJjm5P1G7OABVm/8MXltm7GoqeLCnCqlGAtAM\n\t4PTfASgpV/ju7IJpd1o0/IshXlnZOrVNX9jO1bg6XREIH5n6QFIv2ZJa6su8XhO7ntAuxXiTS2+\n\t4IUok1W7zL7ITbEugA3KIrE=",
        "From": "Chengwen Feng <fengchengwen@huawei.com>",
        "To": "<alex@shazbot.org>, <jgg@ziepe.ca>",
        "CC": "<wathsala.vithanage@arm.com>, <helgaas@kernel.org>,\n\t<wangzhou1@hisilicon.com>, <wangyushan12@huawei.com>,\n\t<liuyonglong@huawei.com>, <kvm@vger.kernel.org>, <linux-pci@vger.kernel.org>",
        "Subject": "[PATCH v5 1/6] PCI/TPH: Fix pcie_tph_get_st_table_loc() field\n extraction",
        "Date": "Mon, 27 Apr 2026 16:58:38 +0800",
        "Message-ID": "<20260427085843.42460-2-fengchengwen@huawei.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20260427085843.42460-1-fengchengwen@huawei.com>",
        "References": "<20260427085843.42460-1-fengchengwen@huawei.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-Type": "text/plain",
        "X-ClientProxiedBy": "kwepems100002.china.huawei.com (7.221.188.206) To\n kwepemk500009.china.huawei.com (7.202.194.94)"
    },
    "content": "pcie_tph_get_st_table_loc() incorrectly uses FIELD_GET(), which shifts the\nfield value to bit 0. But the function is designed to return raw\nPCI_TPH_LOC_* values as defined in the function comment.\n\nThis causes incorrect ST table location detection. Fix it by using bitwise\nAND with PCI_TPH_CAP_LOC_MASK to return the unshifted field value matching\nthe function specification.\n\nFixes: d2e8a34876ce (\"PCI/TPH: Add Steering Tag support\")\nCc: stable@vger.kernel.org\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n drivers/pci/tph.c | 8 +-------\n 1 file changed, 1 insertion(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/pci/tph.c b/drivers/pci/tph.c\nindex 91145e8d9d95..f17b74b5fb1e 100644\n--- a/drivers/pci/tph.c\n+++ b/drivers/pci/tph.c\n@@ -170,7 +170,7 @@ u32 pcie_tph_get_st_table_loc(struct pci_dev *pdev)\n \n \tpci_read_config_dword(pdev, pdev->tph_cap + PCI_TPH_CAP, &reg);\n \n-\treturn FIELD_GET(PCI_TPH_CAP_LOC_MASK, reg);\n+\treturn reg & PCI_TPH_CAP_LOC_MASK;\n }\n EXPORT_SYMBOL(pcie_tph_get_st_table_loc);\n \n@@ -183,11 +183,7 @@ u16 pcie_tph_get_st_table_size(struct pci_dev *pdev)\n \tu32 reg;\n \tu32 loc;\n \n-\t/* Check ST table location first */\n \tloc = pcie_tph_get_st_table_loc(pdev);\n-\n-\t/* Convert loc to match with PCI_TPH_LOC_* defined in pci_regs.h */\n-\tloc = FIELD_PREP(PCI_TPH_CAP_LOC_MASK, loc);\n \tif (loc != PCI_TPH_LOC_CAP)\n \t\treturn 0;\n \n@@ -316,8 +312,6 @@ int pcie_tph_set_st_entry(struct pci_dev *pdev, unsigned int index, u16 tag)\n \tset_ctrl_reg_req_en(pdev, PCI_TPH_REQ_DISABLE);\n \n \tloc = pcie_tph_get_st_table_loc(pdev);\n-\t/* Convert loc to match with PCI_TPH_LOC_* */\n-\tloc = FIELD_PREP(PCI_TPH_CAP_LOC_MASK, loc);\n \n \tswitch (loc) {\n \tcase PCI_TPH_LOC_MSIX:\n",
    "prefixes": [
        "v5",
        "1/6"
    ]
}