get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 814513,
    "url": "http://patchwork.ozlabs.org/api/patches/814513/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/e418fc44a06a331eaf533605dfa0d6befd91857b.1505570561.git.balaton@eik.bme.hu/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<e418fc44a06a331eaf533605dfa0d6befd91857b.1505570561.git.balaton@eik.bme.hu>",
    "list_archive_url": null,
    "date": "2017-09-16T14:02:41",
    "name": "[v2,1/4] ohci: Allow sysbus version to be used as a companion",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "49c6dd81d91054d8f306c61c4f82925647d33228",
    "submitter": {
        "id": 16148,
        "url": "http://patchwork.ozlabs.org/api/people/16148/?format=api",
        "name": "BALATON Zoltan",
        "email": "balaton@eik.bme.hu"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/e418fc44a06a331eaf533605dfa0d6befd91857b.1505570561.git.balaton@eik.bme.hu/mbox/",
    "series": [
        {
            "id": 3444,
            "url": "http://patchwork.ozlabs.org/api/series/3444/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=3444",
            "date": "2017-09-16T14:02:41",
            "name": "Sam460ex emulation",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/3444/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/814513/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/814513/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xvZ320mrCz9t2M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 17 Sep 2017 00:12:14 +1000 (AEST)",
            "from localhost ([::1]:57449 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dtDpL-0000Zr-Rk\n\tfor incoming@patchwork.ozlabs.org; Sat, 16 Sep 2017 10:12:11 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:42177)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <balaton@eik.bme.hu>) id 1dtDlp-0006fg-T7\n\tfor qemu-devel@nongnu.org; Sat, 16 Sep 2017 10:08:35 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <balaton@eik.bme.hu>) id 1dtDln-0003T3-2G\n\tfor qemu-devel@nongnu.org; Sat, 16 Sep 2017 10:08:33 -0400",
            "from zero.eik.bme.hu ([2001:738:2001:2001::2001]:41128)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <balaton@eik.bme.hu>)\n\tid 1dtDlm-0003Mm-RQ; Sat, 16 Sep 2017 10:08:30 -0400",
            "from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182])\n\tby localhost (Postfix) with SMTP id A233B7456B9;\n\tSat, 16 Sep 2017 16:08:16 +0200 (CEST)",
            "by zero.eik.bme.hu (Postfix, from userid 432)\n\tid E86EB7456F2; Sat, 16 Sep 2017 16:08:15 +0200 (CEST)"
        ],
        "Message-Id": "<e418fc44a06a331eaf533605dfa0d6befd91857b.1505570561.git.balaton@eik.bme.hu>",
        "In-Reply-To": "<cover.1505570561.git.balaton@eik.bme.hu>",
        "References": "<cover.1505570561.git.balaton@eik.bme.hu>",
        "From": "BALATON Zoltan <balaton@eik.bme.hu>",
        "Date": "Sat, 16 Sep 2017 16:02:41 +0200",
        "To": "qemu-devel@nongnu.org,\n    qemu-ppc@nongnu.org",
        "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.",
        "X-Received-From": "2001:738:2001:2001::2001",
        "Subject": "[Qemu-devel] [PATCH v2 1/4] ohci: Allow sysbus version to be used\n\tas a companion",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Id": "<qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.nongnu.org/archive/html/qemu-devel/>",
        "List-Post": "<mailto:qemu-devel@nongnu.org>",
        "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>",
        "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>",
        "Cc": "Francois Revol <revol@free.fr>, Gerd Hoffmann <kraxel@redhat.com>,\n\tAlexander Graf <agraf@suse.de>,\n\tDavid Gibson <david@gibson.dropbear.id.au>",
        "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org",
        "Sender": "\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"
    },
    "content": "Some PPC SoCs have an EHCI with OHCI companion USB controller. To\nemulate this allow the sysbus version of OHCI to be used as a companion.\n\nSigned-off-by: BALATON Zoltan <balaton@eik.bme.hu>\nReviewed-by: David Gibson <david@gibson.dropbear.id.au>\nReviewed-by: Gerd Hoffmann <kraxel@redhat.com>\n---\nv2: Added R-b from http://lists.nongnu.org/archive/html/qemu-ppc/2017-08/msg00346.html\n\n hw/usb/hcd-ohci.c | 15 ++++++++++++---\n 1 file changed, 12 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c\nindex 267982e..17beedd 100644\n--- a/hw/usb/hcd-ohci.c\n+++ b/hw/usb/hcd-ohci.c\n@@ -1999,7 +1999,9 @@ typedef struct {\n     /*< public >*/\n \n     OHCIState ohci;\n+    char *masterbus;\n     uint32_t num_ports;\n+    uint32_t firstport;\n     dma_addr_t dma_offset;\n } OHCISysBusState;\n \n@@ -2007,10 +2009,15 @@ static void ohci_realize_pxa(DeviceState *dev, Error **errp)\n {\n     OHCISysBusState *s = SYSBUS_OHCI(dev);\n     SysBusDevice *sbd = SYS_BUS_DEVICE(dev);\n+    Error *err = NULL;\n \n-    /* Cannot fail as we pass NULL for masterbus */\n-    usb_ohci_init(&s->ohci, dev, s->num_ports, s->dma_offset, NULL, 0,\n-                  &address_space_memory, &error_abort);\n+    usb_ohci_init(&s->ohci, dev, s->num_ports, s->dma_offset,\n+                  s->masterbus, s->firstport,\n+                  &address_space_memory, &err);\n+    if (err) {\n+        error_propagate(errp, err);\n+        return;\n+    }\n     sysbus_init_irq(sbd, &s->ohci.irq);\n     sysbus_init_mmio(sbd, &s->ohci.mem);\n }\n@@ -2142,7 +2149,9 @@ static const TypeInfo ohci_pci_info = {\n };\n \n static Property ohci_sysbus_properties[] = {\n+    DEFINE_PROP_STRING(\"masterbus\", OHCISysBusState, masterbus),\n     DEFINE_PROP_UINT32(\"num-ports\", OHCISysBusState, num_ports, 3),\n+    DEFINE_PROP_UINT32(\"firstport\", OHCISysBusState, firstport, 0),\n     DEFINE_PROP_DMAADDR(\"dma-offset\", OHCISysBusState, dma_offset, 0),\n     DEFINE_PROP_END_OF_LIST(),\n };\n",
    "prefixes": [
        "v2",
        "1/4"
    ]
}