get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 908226,
    "url": "http://patchwork.ozlabs.org/api/patches/908226/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/152537764322.62474.552711932384023140.stgit@bhelgaas-glaptop.roam.corp.google.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": "<152537764322.62474.552711932384023140.stgit@bhelgaas-glaptop.roam.corp.google.com>",
    "list_archive_url": null,
    "date": "2018-05-03T20:00:43",
    "name": "[v6,5/5] PCI: Remove unused pcie_get_minimum_link()",
    "commit_ref": null,
    "pull_url": null,
    "state": "awaiting-upstream",
    "archived": false,
    "hash": "1abeb6a30e9208bd4e3a42ad95954b94d27e5f11",
    "submitter": {
        "id": 67298,
        "url": "http://patchwork.ozlabs.org/api/people/67298/?format=api",
        "name": "Bjorn Helgaas",
        "email": "helgaas@kernel.org"
    },
    "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/152537764322.62474.552711932384023140.stgit@bhelgaas-glaptop.roam.corp.google.com/mbox/",
    "series": [
        {
            "id": 42437,
            "url": "http://patchwork.ozlabs.org/api/series/42437/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=42437",
            "date": "2018-05-03T20:00:07",
            "name": "PCI: Improve PCIe link status reporting",
            "version": 6,
            "mbox": "http://patchwork.ozlabs.org/series/42437/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/908226/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/908226/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;\n\tdmarc=fail (p=none dis=none) header.from=kernel.org",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=kernel.org header.i=@kernel.org\n\theader.b=\"YcN1du8H\"; dkim-atps=neutral"
        ],
        "Received": [
            "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 40cQxZ19DJz9s4r\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  4 May 2018 06:00:50 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id A20E489D7A;\n\tThu,  3 May 2018 20:00:48 +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 r0hihsk4YZWr; Thu,  3 May 2018 20:00:48 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 31BD389D5F;\n\tThu,  3 May 2018 20:00:48 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 3DC9D1CEF86\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  3 May 2018 20:00:46 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 3AB3388AB1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  3 May 2018 20:00:46 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id MDsesxAYZMNl for <intel-wired-lan@lists.osuosl.org>;\n\tThu,  3 May 2018 20:00:45 +0000 (UTC)",
            "from mail.kernel.org (mail.kernel.org [198.145.29.99])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 0926E88AA6\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu,  3 May 2018 20:00:45 +0000 (UTC)",
            "from localhost (unknown [69.71.5.252])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 76A0821771;\n\tThu,  3 May 2018 20:00:44 +0000 (UTC)"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=default; t=1525377644;\n\tbh=jwvTJdDcuB+oni8Je/9wtyq+byacShltB/5oHafc+Ec=;\n\th=Subject:From:To:Cc:Date:In-Reply-To:References:From;\n\tb=YcN1du8HJAUCbwU/upmSRsPZaULPa7V0R/EqvMwgc0mWpjU1aKctcKbEHkztaSf/b\n\t/gqPRIGaUJdGA3ZlLdaYRuQtdub5HvTq8Fu5XATjVaciyb8mqhJU3EYFEH+/MRM4vP\n\tMdjs8SOdtRJyj+3UKAznjG3U2CNiQ+wT4PJhsTPk=",
        "From": "Bjorn Helgaas <helgaas@kernel.org>",
        "To": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>,\n\tGanesh Goudar <ganeshgr@chelsio.com>,\n\tMichael Chan <michael.chan@broadcom.com>, \n\tAriel Elior <ariel.elior@cavium.com>",
        "Date": "Thu, 03 May 2018 15:00:43 -0500",
        "Message-ID": "<152537764322.62474.552711932384023140.stgit@bhelgaas-glaptop.roam.corp.google.com>",
        "In-Reply-To": "<152537719056.62474.2571390812509425478.stgit@bhelgaas-glaptop.roam.corp.google.com>",
        "References": "<152537719056.62474.2571390812509425478.stgit@bhelgaas-glaptop.roam.corp.google.com>",
        "User-Agent": "StGit/0.18",
        "MIME-Version": "1.0",
        "Subject": "[Intel-wired-lan] [PATCH v6 5/5] PCI: Remove unused\n\tpcie_get_minimum_link()",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.24",
        "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": "Jakub Kicinski <kubakici@wp.pl>, linux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org, Tal Gilboa <talgi@mellanox.com>,\n\tintel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,\n\teverest-linux-l2@cavium.com, Tariq Toukan <tariqt@mellanox.com>",
        "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": "From: Bjorn Helgaas <bhelgaas@google.com>\n\nIn some cases pcie_get_minimum_link() returned misleading information\nbecause it found the slowest link and the narrowest link without\nconsidering the total bandwidth of the link.\n\nFor example, consider a path with these two links:\n\n  - 16.0 GT/s  x1 link  (16.0 * 10^9 * 128 / 130) *  1 / 8 = 1969 MB/s\n  -  2.5 GT/s x16 link  ( 2.5 * 10^9 *   8 /  10) * 16 / 8 = 4000 MB/s\n\nThe available bandwidth of the path is limited by the 16 GT/s link to about\n1969 MB/s, but pcie_get_minimum_link() returned 2.5 GT/s x1, which\ncorresponds to only 250 MB/s.\n\nCallers should use pcie_print_link_status() instead, or\npcie_bandwidth_available() if they need more detailed information.\n\nRemove pcie_get_minimum_link() since there are no callers left.\n\nSigned-off-by: Bjorn Helgaas <bhelgaas@google.com>\n---\n drivers/pci/pci.c   |   43 -------------------------------------------\n include/linux/pci.h |    2 --\n 2 files changed, 45 deletions(-)",
    "diff": "diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c\nindex e597655a5643..4bafa817c40a 100644\n--- a/drivers/pci/pci.c\n+++ b/drivers/pci/pci.c\n@@ -5069,49 +5069,6 @@ int pcie_set_mps(struct pci_dev *dev, int mps)\n }\n EXPORT_SYMBOL(pcie_set_mps);\n \n-/**\n- * pcie_get_minimum_link - determine minimum link settings of a PCI device\n- * @dev: PCI device to query\n- * @speed: storage for minimum speed\n- * @width: storage for minimum width\n- *\n- * This function will walk up the PCI device chain and determine the minimum\n- * link width and speed of the device.\n- */\n-int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,\n-\t\t\t  enum pcie_link_width *width)\n-{\n-\tint ret;\n-\n-\t*speed = PCI_SPEED_UNKNOWN;\n-\t*width = PCIE_LNK_WIDTH_UNKNOWN;\n-\n-\twhile (dev) {\n-\t\tu16 lnksta;\n-\t\tenum pci_bus_speed next_speed;\n-\t\tenum pcie_link_width next_width;\n-\n-\t\tret = pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnksta);\n-\t\tif (ret)\n-\t\t\treturn ret;\n-\n-\t\tnext_speed = pcie_link_speed[lnksta & PCI_EXP_LNKSTA_CLS];\n-\t\tnext_width = (lnksta & PCI_EXP_LNKSTA_NLW) >>\n-\t\t\tPCI_EXP_LNKSTA_NLW_SHIFT;\n-\n-\t\tif (next_speed < *speed)\n-\t\t\t*speed = next_speed;\n-\n-\t\tif (next_width < *width)\n-\t\t\t*width = next_width;\n-\n-\t\tdev = dev->bus->self;\n-\t}\n-\n-\treturn 0;\n-}\n-EXPORT_SYMBOL(pcie_get_minimum_link);\n-\n /**\n  * pcie_bandwidth_available - determine minimum link settings of a PCIe\n  *\t\t\t      device and its bandwidth limitation\ndiff --git a/include/linux/pci.h b/include/linux/pci.h\nindex 73178a2fcee0..230615620a4a 100644\n--- a/include/linux/pci.h\n+++ b/include/linux/pci.h\n@@ -1079,8 +1079,6 @@ int pcie_get_readrq(struct pci_dev *dev);\n int pcie_set_readrq(struct pci_dev *dev, int rq);\n int pcie_get_mps(struct pci_dev *dev);\n int pcie_set_mps(struct pci_dev *dev, int mps);\n-int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed,\n-\t\t\t  enum pcie_link_width *width);\n u32 pcie_bandwidth_available(struct pci_dev *dev, struct pci_dev **limiting_dev,\n \t\t\t     enum pci_bus_speed *speed,\n \t\t\t     enum pcie_link_width *width);\n",
    "prefixes": [
        "v6",
        "5/5"
    ]
}