get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1029080,
    "url": "http://patchwork.ozlabs.org/api/patches/1029080/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190122064544.27426-1-kai.heng.feng@canonical.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20190122064544.27426-1-kai.heng.feng@canonical.com>",
    "list_archive_url": null,
    "date": "2019-01-22T06:45:44",
    "name": "PCI / ACPI: Don't clear pme_poll on device that has unreliable ACPI wake",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b49aaa4dc4455dd8720b71d4c62c68686ba4136c",
    "submitter": {
        "id": 70328,
        "url": "http://patchwork.ozlabs.org/api/people/70328/?format=api",
        "name": "Kai-Heng Feng",
        "email": "kai.heng.feng@canonical.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190122064544.27426-1-kai.heng.feng@canonical.com/mbox/",
    "series": [
        {
            "id": 87453,
            "url": "http://patchwork.ozlabs.org/api/series/87453/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=87453",
            "date": "2019-01-22T06:45:44",
            "name": "PCI / ACPI: Don't clear pme_poll on device that has unreliable ACPI wake",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/87453/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1029080/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1029080/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dmarc=fail (p=none dis=none)\n\theader.from=canonical.com"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 43kJpf1n5Rz9s9G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 22 Jan 2019 17:46:00 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id DAD8C87530;\n\tTue, 22 Jan 2019 06:45:58 +0000 (UTC)",
            "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id we13rVYd0ifS; Tue, 22 Jan 2019 06:45:56 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B76CA87532;\n\tTue, 22 Jan 2019 06:45:56 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 576261BF282\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Jan 2019 06:45:56 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 5454585585\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Jan 2019 06:45:56 +0000 (UTC)",
            "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id q8qqRjmv-NSU for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Jan 2019 06:45:55 +0000 (UTC)",
            "from youngberry.canonical.com (youngberry.canonical.com\n\t[91.189.89.112])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 1F7F785582\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Jan 2019 06:45:55 +0000 (UTC)",
            "from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37]\n\thelo=localhost) by youngberry.canonical.com with esmtpsa\n\t(TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.76) (envelope-from <kai.heng.feng@canonical.com>)\n\tid 1glpoj-0003zl-0U; Tue, 22 Jan 2019 06:45:49 +0000"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "From": "Kai-Heng Feng <kai.heng.feng@canonical.com>",
        "To": "rjw@rjwysocki.net",
        "Date": "Tue, 22 Jan 2019 14:45:44 +0800",
        "Message-Id": "<20190122064544.27426-1-kai.heng.feng@canonical.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[Intel-wired-lan] [PATCH] PCI / ACPI: Don't clear pme_poll on\n\tdevice that has unreliable ACPI wake",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "Cc": "netdev@vger.kernel.org, linux-kernel@vger.kernel.org,\n\tlinux-acpi@vger.kernel.org, Kai-Heng Feng <kai.heng.feng@canonical.com>, \n\tintel-wired-lan@lists.osuosl.org, linux-pci@vger.kernel.org,\n\tbhelgaas@google.com, lenb@kernel.org",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "There are some e1000e devices can only be woken up from D3 one time, by\nplugging ethernet cable. Subsequent cable plugging does set PME bit\ncorrectly, but it still doesn't get woken up.\n\nSince e1000e connects to the root complex directly, we rely on ACPI to\nwake it up. In this case, the GPE from _PRW only works once and stops\nworking after that.\n\nSo introduce a new PCI quirk, to avoid clearing pme_poll flag for buggy\nplatform firmwares that have unreliable GPE wake.\n\nSigned-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>\n---\n drivers/pci/pci-acpi.c | 2 +-\n drivers/pci/quirks.c   | 8 ++++++++\n include/linux/pci.h    | 1 +\n 3 files changed, 10 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c\nindex e1949f7efd9c..184e2fc8a294 100644\n--- a/drivers/pci/pci-acpi.c\n+++ b/drivers/pci/pci-acpi.c\n@@ -430,7 +430,7 @@ static void pci_acpi_wake_dev(struct acpi_device_wakeup_context *context)\n \n \tpci_dev = to_pci_dev(context->dev);\n \n-\tif (pci_dev->pme_poll)\n+\tif (pci_dev->pme_poll && !pci_dev->unreliable_acpi_wake)\n \t\tpci_dev->pme_poll = false;\n \n \tif (pci_dev->current_state == PCI_D3cold) {\ndiff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c\nindex b0a413f3f7ca..ed4863496fa8 100644\n--- a/drivers/pci/quirks.c\n+++ b/drivers/pci/quirks.c\n@@ -4948,6 +4948,14 @@ DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_AMD, PCI_ANY_ID,\n DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,\n \t\t\t      PCI_CLASS_MULTIMEDIA_HD_AUDIO, 8, quirk_gpu_hda);\n \n+static void quirk_unreliable_acpi_wake(struct pci_dev *pdev)\n+{\n+\tpci_info(pdev, \"ACPI Wake unreliable, always poll PME\\n\");\n+\tpdev->unreliable_acpi_wake = 1;\n+}\n+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x15bb, quirk_unreliable_acpi_wake);\n+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x15bd, quirk_unreliable_acpi_wake);\n+\n /*\n  * Some IDT switches incorrectly flag an ACS Source Validation error on\n  * completions for config read requests even though PCIe r4.0, sec\ndiff --git a/include/linux/pci.h b/include/linux/pci.h\nindex 65f1d8c2f082..d22065c1576f 100644\n--- a/include/linux/pci.h\n+++ b/include/linux/pci.h\n@@ -331,6 +331,7 @@ struct pci_dev {\n \tunsigned int\tpme_support:5;\t/* Bitmask of states from which PME#\n \t\t\t\t\t   can be generated */\n \tunsigned int\tpme_poll:1;\t/* Poll device's PME status bit */\n+\tunsigned int\tunreliable_acpi_wake:1;\t/* ACPI Wake doesn't always work */\n \tunsigned int\td1_support:1;\t/* Low power state D1 is supported */\n \tunsigned int\td2_support:1;\t/* Low power state D2 is supported */\n \tunsigned int\tno_d1d2:1;\t/* D1 and D2 are forbidden */\n",
    "prefixes": []
}