get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 633515,
    "url": "http://patchwork.ozlabs.org/api/patches/633515/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/1465535032-26749-12-git-send-email-gwshan@linux.vnet.ibm.com/",
    "project": {
        "id": 44,
        "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api",
        "name": "skiboot firmware development",
        "link_name": "skiboot",
        "list_id": "skiboot.lists.ozlabs.org",
        "list_email": "skiboot@lists.ozlabs.org",
        "web_url": "http://github.com/open-power/skiboot",
        "scm_url": "http://github.com/open-power/skiboot",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1465535032-26749-12-git-send-email-gwshan@linux.vnet.ibm.com>",
    "list_archive_url": null,
    "date": "2016-06-10T05:03:40",
    "name": "[v12,11/23] core/pci: Extend pci_restore_bridge_buses() for PCI slot",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "85eccc7a1bdee2846fb87aa357bde32f476ea895",
    "submitter": {
        "id": 63923,
        "url": "http://patchwork.ozlabs.org/api/people/63923/?format=api",
        "name": "Gavin Shan",
        "email": "gwshan@linux.vnet.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/1465535032-26749-12-git-send-email-gwshan@linux.vnet.ibm.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/633515/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/633515/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "skiboot@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "skiboot@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\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 3rQqsn2YrHz9sD3\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 10 Jun 2016 15:07:09 +1000 (AEST)",
            "from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3rQqsn1mbvzDqXx\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 10 Jun 2016 15:07:09 +1000 (AEST)",
            "from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n\t[148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3rQqr872VmzDqNq\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:05:44 +1000 (AEST)",
            "from pps.filterd (m0098419.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id\n\tu5A53ohU044375\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 01:05:43 -0400",
            "from e23smtp02.au.ibm.com (e23smtp02.au.ibm.com [202.81.31.144])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 23fm50u1p8-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 01:05:42 -0400",
            "from localhost\n\tby e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <skiboot@lists.ozlabs.org> from <gwshan@linux.vnet.ibm.com>;\n\tFri, 10 Jun 2016 15:05:39 +1000",
            "from d23dlp02.au.ibm.com (202.81.31.213)\n\tby e23smtp02.au.ibm.com (202.81.31.208) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tFri, 10 Jun 2016 15:05:26 +1000",
            "from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219])\n\tby d23dlp02.au.ibm.com (Postfix) with ESMTP id 7AC3A2BB0059\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:05:15 +1000 (EST)",
            "from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97])\n\tby d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n\tu5A555Rt12386794\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:05:05 +1000",
            "from d23av03.au.ibm.com (localhost [127.0.0.1])\n\tby d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id\n\tu5A54mjC024475\n\tfor <skiboot@lists.ozlabs.org>; Fri, 10 Jun 2016 15:04:49 +1000",
            "from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.192.253.14])\n\tby d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id\n\tu5A54m7m024456; Fri, 10 Jun 2016 15:04:48 +1000",
            "from bran.ozlabs.ibm.com (haven.au.ibm.com [9.192.254.114])\n\tby ozlabs.au.ibm.com (Postfix) with ESMTP id A8290A01AE;\n\tFri, 10 Jun 2016 15:03:57 +1000 (AEST)",
            "from gwshan (shangw.ozlabs.ibm.com [10.61.2.199])\n\tby bran.ozlabs.ibm.com (Postfix) with ESMTP id A7615E3B1A;\n\tFri, 10 Jun 2016 15:03:57 +1000 (AEST)",
            "by gwshan (Postfix, from userid 1000)\n\tid 8D961942CA3; Fri, 10 Jun 2016 15:03:57 +1000 (AEST)"
        ],
        "X-IBM-Helo": "d23dlp02.au.ibm.com",
        "X-IBM-MailFrom": "gwshan@linux.vnet.ibm.com",
        "X-IBM-RcptTo": "skiboot@lists.ozlabs.org",
        "From": "Gavin Shan <gwshan@linux.vnet.ibm.com>",
        "To": "skiboot@lists.ozlabs.org",
        "Date": "Fri, 10 Jun 2016 15:03:40 +1000",
        "X-Mailer": "git-send-email 2.1.0",
        "In-Reply-To": "<1465535032-26749-1-git-send-email-gwshan@linux.vnet.ibm.com>",
        "References": "<1465535032-26749-1-git-send-email-gwshan@linux.vnet.ibm.com>",
        "X-TM-AS-MML": "disable",
        "X-Content-Scanned": "Fidelis XPS MAILER",
        "x-cbid": "16061005-0004-0000-0000-0000016C9175",
        "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused",
        "x-cbparentid": "16061005-0005-0000-0000-0000080CBB64",
        "Message-Id": "<1465535032-26749-12-git-send-email-gwshan@linux.vnet.ibm.com>",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2016-06-10_04:, , signatures=0",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000\n\tdefinitions=main-1606100058",
        "Subject": "[Skiboot] [PATCH v12 11/23] core/pci: Extend\n\tpci_restore_bridge_buses() for PCI slot",
        "X-BeenThere": "skiboot@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.22",
        "Precedence": "list",
        "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>",
        "List-Post": "<mailto:skiboot@lists.ozlabs.org>",
        "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "alistair@popple.id.au",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"
    },
    "content": "Currently, pci_restore_bridge_buses() restores the assigned bus\nranges for all PCI bridges behind the specified PHB. This extends\nthe function and allows doing same thing for the PCI bridges behind\nthe specified slot. The extended functionality is going to be used\nby PCI hotplug logic in the subsequent patches.\n\nSigned-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>\nReviewed-by: Russell Currey <ruscur@russell.cc>\n---\n core/pci.c     | 4 ++--\n hw/p7ioc-phb.c | 2 +-\n hw/phb3.c      | 2 +-\n include/pci.h  | 2 +-\n 4 files changed, 5 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/core/pci.c b/core/pci.c\nindex 64b9189..8040932 100644\n--- a/core/pci.c\n+++ b/core/pci.c\n@@ -1628,9 +1628,9 @@ static int __pci_restore_bridge_buses(struct phb *phb,\n \treturn 0;\n }\n \n-void pci_restore_bridge_buses(struct phb *phb)\n+void pci_restore_bridge_buses(struct phb *phb, struct pci_device *pd)\n {\n-\tpci_walk_dev(phb, NULL, __pci_restore_bridge_buses, NULL);\n+\tpci_walk_dev(phb, pd, __pci_restore_bridge_buses, NULL);\n }\n \n struct pci_cfg_reg_filter *pci_find_cfg_reg_filter(struct pci_device *pd,\ndiff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c\nindex 591c9ec..a50bae0 100644\n--- a/hw/p7ioc-phb.c\n+++ b/hw/p7ioc-phb.c\n@@ -327,7 +327,7 @@ static int64_t p7ioc_sm_freset(struct p7ioc_phb *p)\n \t\t\t */\n \t\t\tif (p->flags & P7IOC_RESTORE_BUS_NUM) {\n \t\t\t\tp->flags &= ~P7IOC_RESTORE_BUS_NUM;\n-\t\t\t\tpci_restore_bridge_buses(&p->phb);\n+\t\t\t\tpci_restore_bridge_buses(&p->phb, NULL);\n \t\t\t}\n \n \t\t\treturn OPAL_SUCCESS;\ndiff --git a/hw/phb3.c b/hw/phb3.c\nindex ab6922c..9a67560 100644\n--- a/hw/phb3.c\n+++ b/hw/phb3.c\n@@ -2093,7 +2093,7 @@ static void phb3_setup_for_link_up(struct phb3 *p)\n \t */\n \tif (p->flags & PHB3_RESTORE_BUS_NUM) {\n \t\tp->flags &= ~PHB3_RESTORE_BUS_NUM;\n-\t\tpci_restore_bridge_buses(&p->phb);\n+\t\tpci_restore_bridge_buses(&p->phb, NULL);\n \t}\n }\n \ndiff --git a/include/pci.h b/include/pci.h\nindex 1039f10..788f1ef 100644\n--- a/include/pci.h\n+++ b/include/pci.h\n@@ -530,7 +530,7 @@ extern struct pci_device *pci_walk_dev(struct phb *phb,\n \t\t\t\t\t\t void *),\n \t\t\t\t       void *userdata);\n extern struct pci_device *pci_find_dev(struct phb *phb, uint16_t bdfn);\n-extern void pci_restore_bridge_buses(struct phb *phb);\n+extern void pci_restore_bridge_buses(struct phb *phb, struct pci_device *pd);\n extern struct pci_cfg_reg_filter *pci_find_cfg_reg_filter(struct pci_device *pd,\n \t\t\t\t\tuint32_t start, uint32_t len);\n extern struct pci_cfg_reg_filter *pci_add_cfg_reg_filter(struct pci_device *pd,\n",
    "prefixes": [
        "v12",
        "11/23"
    ]
}