get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 814930,
    "url": "http://patchwork.ozlabs.org/api/patches/814930/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/1505742050-5697-9-git-send-email-bmeng.cn@gmail.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1505742050-5697-9-git-send-email-bmeng.cn@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-18T13:40:44",
    "name": "[U-Boot,08/14] usb: xhci: Fix max packet size for full speed device endpoint 0",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0db7d6d59987a77fb3ff5aed2c810dda00174f44",
    "submitter": {
        "id": 64981,
        "url": "http://patchwork.ozlabs.org/api/people/64981/?format=api",
        "name": "Bin Meng",
        "email": "bmeng.cn@gmail.com"
    },
    "delegate": {
        "id": 1699,
        "url": "http://patchwork.ozlabs.org/api/users/1699/?format=api",
        "username": "marex",
        "first_name": "Marek",
        "last_name": "Vasut",
        "email": "marek.vasut@gmail.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/1505742050-5697-9-git-send-email-bmeng.cn@gmail.com/mbox/",
    "series": [
        {
            "id": 3647,
            "url": "http://patchwork.ozlabs.org/api/series/3647/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=3647",
            "date": "2017-09-18T13:40:36",
            "name": "usb: xhci: Add interrupt transfer support and full speed device support",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/3647/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/814930/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/814930/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"UbY1w3/X\"; dkim-atps=neutral"
        ],
        "Received": [
            "from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwnJW5dYcz9s4s\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 18 Sep 2017 23:43:07 +1000 (AEST)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 857BFC21F68; Mon, 18 Sep 2017 13:39:04 +0000 (UTC)",
            "from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 48DDBC21F39;\n\tMon, 18 Sep 2017 13:37:18 +0000 (UTC)",
            "by lists.denx.de (Postfix, from userid 105)\n\tid 34E65C21F5B; Mon, 18 Sep 2017 13:36:44 +0000 (UTC)",
            "from mail-it0-f68.google.com (mail-it0-f68.google.com\n\t[209.85.214.68])\n\tby lists.denx.de (Postfix) with ESMTPS id 91435C21E68\n\tfor <u-boot@lists.denx.de>; Mon, 18 Sep 2017 13:36:40 +0000 (UTC)",
            "by mail-it0-f68.google.com with SMTP id g18so552724itg.0\n\tfor <u-boot@lists.denx.de>; Mon, 18 Sep 2017 06:36:40 -0700 (PDT)",
            "from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com.\n\t[147.11.156.139]) by smtp.gmail.com with ESMTPSA id\n\t193sm2528740ion.83.2017.09.18.06.36.37\n\t(version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 18 Sep 2017 06:36:38 -0700 (PDT)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=9CCdmG+kV8a6oXde/KZXoOAlq2vUZMtfqsg0qiE7erI=;\n\tb=UbY1w3/XS/i6wy21fl5d8m6Iur0KM63U66Im+5P6YkuLETRmFDNDiiGFcnaRju5NVY\n\t1ApYq03YMyTCj2oGo0oN/LAsNVFfKGaKcEV+dD4C48UmvNNjpq/+lASRB+WU19iLWJZP\n\tuJduXgKAtla30PjXVoKGcJacmv1d+xDU3klYMV3RlEIAXyS+xQ6JSlE+5ZIzbtBS0Uan\n\t1l9VehAfoekh+XJDFyzjiFNP6iX1CrsTQh+N3ft+hoYjpn4CsOSf0i4jnDtbgzbW9GBm\n\t1SGj9Djpf3BccZsdEEfZLxvTjNad1jQbT6AkYot2khXPeu2kUrYqwoQencQNeI1KI6qH\n\tB2LQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=9CCdmG+kV8a6oXde/KZXoOAlq2vUZMtfqsg0qiE7erI=;\n\tb=NloCsBn9gq3ETV/w5FyMI5I/cM74GUpLGDi5M+NLmpXhhMjsFWVj2b28F5W6ZmW3n9\n\tauXdPVhjKJl4zJmAOnDmVMhgDGmJc+F+JTCvr+g24dGsVd7HsZH40WpqM0uxnPL81VXX\n\tgFLm6/i/yIFjpYtaDdmRfcQpcF3t+gxi8Dz/OrTZ6w9GLCnXSHU0QnVgsAP9I61DppG4\n\t5WQz95SLhakHV5JGCrSJxJHn2aWmFY0tX/IKbwkro9l0qzLTX8WWrfCivMs6mYrwlue9\n\t49JyU4kSlugk+9lncUah5F22lYg/NknCG2nNcD+jdEkLkBegdfDZZJZq5QsLhZmWb56X\n\teBQA==",
        "X-Gm-Message-State": "AHPjjUiD0DKofbV/CXI/Dx0eY0Ot+D0w6EpDpa0TQyPf+jpIpVhFawrL\n\tfM1ZTiS/eGA9OdpoNwBWFY0=",
        "X-Google-Smtp-Source": "AOwi7QCe3F4o7SQPazh4K1myu3F7C2DXEKYFIUGCvF1gvnRUe3zL++asWYc+5eIVMjWkFG41dShPXg==",
        "X-Received": "by 10.36.39.197 with SMTP id g188mr698072ita.54.1505741799514;\n\tMon, 18 Sep 2017 06:36:39 -0700 (PDT)",
        "From": "Bin Meng <bmeng.cn@gmail.com>",
        "To": "Marek Vasut <marex@denx.de>, U-Boot Mailing List <u-boot@lists.denx.de>",
        "Date": "Mon, 18 Sep 2017 06:40:44 -0700",
        "Message-Id": "<1505742050-5697-9-git-send-email-bmeng.cn@gmail.com>",
        "X-Mailer": "git-send-email 1.7.9.5",
        "In-Reply-To": "<1505742050-5697-1-git-send-email-bmeng.cn@gmail.com>",
        "References": "<1505742050-5697-1-git-send-email-bmeng.cn@gmail.com>",
        "Cc": "Stefan Roese <sr@denx.de>",
        "Subject": "[U-Boot] [PATCH 08/14] usb: xhci: Fix max packet size for full\n\tspeed device endpoint 0",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.18",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<http://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>"
    },
    "content": "In xhci_check_maxpacket(), the control endpoint 0 max packet size\nis wrongly taken from the interface's endpoint descriptor. However\nthe default endpoint 0 does not come with an endpoint descriptor\nhence is not included in the interface structure. Change to use\nepmaxpacketin[0] instead.\n\nThe other bug in this routine is that when setting max packet size\nto the xHC endpoint 0 context, it does not clear its previous value\nat all before programming a new one.\n\nSigned-off-by: Bin Meng <bmeng.cn@gmail.com>\n---\n\n drivers/usb/host/xhci.c | 8 +++-----\n 1 file changed, 3 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c\nindex 4b3d58d..ec82fa6 100644\n--- a/drivers/usb/host/xhci.c\n+++ b/drivers/usb/host/xhci.c\n@@ -546,16 +546,13 @@ int xhci_check_maxpacket(struct usb_device *udev)\n \tint max_packet_size;\n \tint hw_max_packet_size;\n \tint ret = 0;\n-\tstruct usb_interface *ifdesc;\n-\n-\tifdesc = &udev->config.if_desc[0];\n \n \tout_ctx = ctrl->devs[slot_id]->out_ctx;\n \txhci_inval_cache((uintptr_t)out_ctx->bytes, out_ctx->size);\n \n \tep_ctx = xhci_get_ep_ctx(ctrl, out_ctx, ep_index);\n \thw_max_packet_size = MAX_PACKET_DECODED(le32_to_cpu(ep_ctx->ep_info2));\n-\tmax_packet_size = usb_endpoint_maxp(&ifdesc->ep_desc[0]);\n+\tmax_packet_size = udev->epmaxpacketin[0];\n \tif (hw_max_packet_size != max_packet_size) {\n \t\tdebug(\"Max Packet Size for ep 0 changed.\\n\");\n \t\tdebug(\"Max packet size in usb_device = %d\\n\", max_packet_size);\n@@ -567,7 +564,8 @@ int xhci_check_maxpacket(struct usb_device *udev)\n \t\t\t\tctrl->devs[slot_id]->out_ctx, ep_index);\n \t\tin_ctx = ctrl->devs[slot_id]->in_ctx;\n \t\tep_ctx = xhci_get_ep_ctx(ctrl, in_ctx, ep_index);\n-\t\tep_ctx->ep_info2 &= cpu_to_le32(~MAX_PACKET_MASK);\n+\t\tep_ctx->ep_info2 &= cpu_to_le32(~((0xffff & MAX_PACKET_MASK)\n+\t\t\t\t\t\t<< MAX_PACKET_SHIFT));\n \t\tep_ctx->ep_info2 |= cpu_to_le32(MAX_PACKET(max_packet_size));\n \n \t\t/*\n",
    "prefixes": [
        "U-Boot",
        "08/14"
    ]
}