get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 818657,
    "url": "http://patchwork.ozlabs.org/api/patches/818657/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20170926141720.25067-7-mika.westerberg@linux.intel.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": "<20170926141720.25067-7-mika.westerberg@linux.intel.com>",
    "list_archive_url": null,
    "date": "2017-09-26T14:17:19",
    "name": "[6/7] PCI: pciehp: Do not clear Presence Detect Changed during initialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "734fcfe8fa49f3cbd438bbb659974caaa38b516e",
    "submitter": {
        "id": 14534,
        "url": "http://patchwork.ozlabs.org/api/people/14534/?format=api",
        "name": "Mika Westerberg",
        "email": "mika.westerberg@linux.intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20170926141720.25067-7-mika.westerberg@linux.intel.com/mbox/",
    "series": [
        {
            "id": 5151,
            "url": "http://patchwork.ozlabs.org/api/series/5151/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=5151",
            "date": "2017-09-26T14:17:19",
            "name": "PCI: Improvements for native PCIe hotplug",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/5151/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/818657/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/818657/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-pci-owner@vger.kernel.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-pci-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1jj42LChz9t3B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 00:18:00 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1030477AbdIZORb (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 26 Sep 2017 10:17:31 -0400",
            "from mga11.intel.com ([192.55.52.93]:56468 \"EHLO mga11.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1030457AbdIZOR1 (ORCPT <rfc822;linux-pci@vger.kernel.org>);\n\tTue, 26 Sep 2017 10:17:27 -0400",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Sep 2017 07:17:27 -0700",
            "from black.fi.intel.com ([10.237.72.28])\n\tby fmsmga001.fm.intel.com with ESMTP; 26 Sep 2017 07:17:24 -0700",
            "by black.fi.intel.com (Postfix, from userid 1001)\n\tid 8A8FB4B4; Tue, 26 Sep 2017 17:17:20 +0300 (EEST)"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.42,441,1500966000\"; d=\"scan'208\";a=\"1199177807\"",
        "From": "Mika Westerberg <mika.westerberg@linux.intel.com>",
        "To": "Bjorn Helgaas <bhelgaas@google.com>",
        "Cc": "Ashok Raj <ashok.raj@intel.com>, Keith Busch <keith.busch@intel.com>,\n\t\"Rafael J . Wysocki\" <rafael.j.wysocki@intel.com>,\n\tLukas Wunner <lukas@wunner.de>, Michael Jamet <michael.jamet@intel.com>,\n\tYehezkel Bernat <yehezkel.bernat@intel.com>, Mario.Limonciello@dell.com,\n\tMika Westerberg <mika.westerberg@linux.intel.com>,\n\tlinux-pci@vger.kernel.org, linux-kernel@vger.kernel.org",
        "Subject": "[PATCH 6/7] PCI: pciehp: Do not clear Presence Detect Changed\n\tduring initialization",
        "Date": "Tue, 26 Sep 2017 17:17:19 +0300",
        "Message-Id": "<20170926141720.25067-7-mika.westerberg@linux.intel.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<20170926141720.25067-1-mika.westerberg@linux.intel.com>",
        "References": "<20170926141720.25067-1-mika.westerberg@linux.intel.com>",
        "Sender": "linux-pci-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<linux-pci.vger.kernel.org>",
        "X-Mailing-List": "linux-pci@vger.kernel.org"
    },
    "content": "It is possible that the hotplug event has already happened before the\ndriver is attached to a PCIe hotplug downstream port. If we just clear\nthe status we never get the hotplug interrupt and thus the event will be\nmissed.\n\nTo make sure that does not happen, we leave Presence Detect Changed bit\nuntouched during initialization. Then once the event is unmasked we get\nan interrupt and handle the hotplug event properly.\n\nSigned-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>\n---\n drivers/pci/hotplug/pciehp_hpc.c | 11 ++++++++---\n 1 file changed, 8 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c\nindex 83c93f9da65a..bc1622aa7a05 100644\n--- a/drivers/pci/hotplug/pciehp_hpc.c\n+++ b/drivers/pci/hotplug/pciehp_hpc.c\n@@ -862,11 +862,16 @@ struct controller *pcie_init(struct pcie_device *dev)\n \tif (link_cap & PCI_EXP_LNKCAP_DLLLARC)\n \t\tctrl->link_active_reporting = 1;\n \n-\t/* Clear all remaining event bits in Slot Status register */\n+\t/*\n+\t * Clear all remaining event bits in Slot Status register except\n+\t * Presence Detect Changed. We want to make sure possible\n+\t * hotplug event is triggered when the interrupt is unmasked so\n+\t * that we don't lose that event.\n+\t */\n \tpcie_capability_write_word(pdev, PCI_EXP_SLTSTA,\n \t\tPCI_EXP_SLTSTA_ABP | PCI_EXP_SLTSTA_PFD |\n-\t\tPCI_EXP_SLTSTA_MRLSC | PCI_EXP_SLTSTA_PDC |\n-\t\tPCI_EXP_SLTSTA_CC | PCI_EXP_SLTSTA_DLLSC);\n+\t\tPCI_EXP_SLTSTA_MRLSC | PCI_EXP_SLTSTA_CC |\n+\t\tPCI_EXP_SLTSTA_DLLSC);\n \n \tctrl_info(ctrl, \"Slot #%d AttnBtn%c PwrCtrl%c MRL%c AttnInd%c PwrInd%c HotPlug%c Surprise%c Interlock%c NoCompl%c LLActRep%c\\n\",\n \t\t(slot_cap & PCI_EXP_SLTCAP_PSN) >> 19,\n",
    "prefixes": [
        "6/7"
    ]
}