get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 818663,
    "url": "http://patchwork.ozlabs.org/api/patches/818663/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20170926141720.25067-2-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-2-mika.westerberg@linux.intel.com>",
    "list_archive_url": null,
    "date": "2017-09-26T14:17:14",
    "name": "[1/7] PCI: Do not allocate more buses than available in parent",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "5404c747795fd2461427a5305128fc25b449d99a",
    "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-2-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/818663/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/818663/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 3y1jkj68bkz9t3R\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 00:19:25 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S967039AbdIZOTI (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tTue, 26 Sep 2017 10:19:08 -0400",
            "from mga09.intel.com ([134.134.136.24]:41555 \"EHLO mga09.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S969429AbdIZORZ (ORCPT <rfc822;linux-pci@vger.kernel.org>);\n\tTue, 26 Sep 2017 10:17:25 -0400",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Sep 2017 07:17:24 -0700",
            "from black.fi.intel.com ([10.237.72.28])\n\tby fmsmga004.fm.intel.com with ESMTP; 26 Sep 2017 07:17:21 -0700",
            "by black.fi.intel.com (Postfix, from userid 1001)\n\tid 4578790; 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=\"316364286\"",
        "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 1/7] PCI: Do not allocate more buses than available in parent",
        "Date": "Tue, 26 Sep 2017 17:17:14 +0300",
        "Message-Id": "<20170926141720.25067-2-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": "One can ask more buses to be reserved for hotplug bridges by passing\npci=hpbussize=N in the kernel command line. However, if the parent bus\ndoes not have enough bus space available we still create child bus with\nthe requested number of subordinate buses.\n\nIn the example below hpbussize is set to one more than we have available\nbuses in the root port:\n\n  pci 0000:07:00.0: [8086:1578] type 01 class 0x060400\n  pci 0000:07:00.0: calling pci_fixup_transparent_bridge+0x0/0x20\n  pci 0000:07:00.0: supports D1 D2\n  pci 0000:07:00.0: PME# supported from D0 D1 D2 D3hot D3cold\n  pci 0000:07:00.0: PME# disabled\n  pci 0000:07:00.0: scanning [bus 00-00] behind bridge, pass 0\n  pci 0000:07:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring\n  pci 0000:07:00.0: scanning [bus 00-00] behind bridge, pass 1\n  pci_bus 0000:08: busn_res: can not insert [bus 08-ff] under [bus 07-3f] (conflicts with (null) [bus 07-3f])\n  pci_bus 0000:08: scanning bus\n  ...\n  pci_bus 0000:0a: bus scan returning with max=40\n  pci_bus 0000:0a: busn_res: [bus 0a-ff] end is updated to 40\n  pci_bus 0000:0a: [bus 0a-40] partially hidden behind bridge 0000:07 [bus 07-3f]\n  pci_bus 0000:08: bus scan returning with max=40\n  pci_bus 0000:08: busn_res: [bus 08-ff] end is updated to 40\n\nInstead of allowing this we limit the subordinate number to be less than\nor equal the maximum subordinate number allocated for the parent bus (if\nit has any).\n\nSigned-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>\n---\n drivers/pci/probe.c | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c\nindex ff94b69738a8..f285cd74088e 100644\n--- a/drivers/pci/probe.c\n+++ b/drivers/pci/probe.c\n@@ -1076,7 +1076,8 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)\n \t\t\tchild = pci_add_new_bus(bus, dev, max+1);\n \t\t\tif (!child)\n \t\t\t\tgoto out;\n-\t\t\tpci_bus_insert_busn_res(child, max+1, 0xff);\n+\t\t\tpci_bus_insert_busn_res(child, max+1,\n+\t\t\t\t\t\tbus->busn_res.end);\n \t\t}\n \t\tmax++;\n \t\tbuses = (buses & 0xff000000)\n@@ -2433,6 +2434,10 @@ unsigned int pci_scan_child_bus(struct pci_bus *bus)\n \tif (bus->self && bus->self->is_hotplug_bridge && pci_hotplug_bus_size) {\n \t\tif (max - bus->busn_res.start < pci_hotplug_bus_size - 1)\n \t\t\tmax = bus->busn_res.start + pci_hotplug_bus_size - 1;\n+\n+\t\t/* Do not allocate more buses than we have room left */\n+\t\tif (max > bus->busn_res.end)\n+\t\t\tmax = bus->busn_res.end;\n \t}\n \n \t/*\n",
    "prefixes": [
        "1/7"
    ]
}