get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 561994,
    "url": "http://patchwork.ozlabs.org/api/patches/561994/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/owrt-patch-20160101-v4-3@vittgam.net/",
    "project": {
        "id": 45,
        "url": "http://patchwork.ozlabs.org/api/projects/45/?format=api",
        "name": "OpenWrt development",
        "link_name": "openwrt",
        "list_id": "openwrt-devel.lists.openwrt.org",
        "list_email": "openwrt-devel@lists.openwrt.org",
        "web_url": "http://openwrt.org/",
        "scm_url": "git://git.openwrt.org/openwrt.git",
        "webscm_url": "https://dev.openwrt.org/browser",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<owrt-patch-20160101-v4-3@vittgam.net>",
    "list_archive_url": null,
    "date": "2015-12-31T23:00:02",
    "name": "[OpenWrt-Devel,v4,3/4] ramips: Get rt3050 ethernet ports to be disabled from the device tree.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "77712974bccfe88dd488b6884f0366a92fe7ee6a",
    "submitter": {
        "id": 65409,
        "url": "http://patchwork.ozlabs.org/api/people/65409/?format=api",
        "name": "Vittorio Gambaletta",
        "email": "openwrt@vittgam.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openwrt/patch/owrt-patch-20160101-v4-3@vittgam.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/561994/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/561994/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<openwrt-devel-bounces@lists.openwrt.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Received": [
            "from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176])\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 4BAB5140BF1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Jan 2016 10:04:37 +1100 (AEDT)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 7A17E28BFFD;\n\tFri,  1 Jan 2016 00:00:40 +0100 (CET)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 97D0F28BE33\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tThu, 31 Dec 2015 23:59:38 +0100 (CET)",
            "from mail.vittgam.net (server1.vittgam.net [213.239.197.142])\n\tby arrakis.dune.hu (Postfix) with ESMTPS\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tThu, 31 Dec 2015 23:59:38 +0100 (CET)",
            "from vl2 (vittgamlaptop2.r1.network.mietitrebbia.rocks\n\t[10.48.3.146]) by mail.vittgam.net with SMTP id tBVN00ol082907;\n\tFri, 1 Jan 2016 00:00:02 +0100"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (4096-bit key;\n\tunprotected) header.d=vittgam.net header.i=@vittgam.net\n\theader.b=U8FJF617; dkim-atps=neutral",
        "X-Spam-Checker-Version": "SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,\n\tT_DKIM_INVALID autolearn=unavailable version=3.3.2",
        "X-policyd-weight": "using cached result; rate:hard: -7.6",
        "X-DKIM": "OpenDKIM Filter v2.4.2 mail.vittgam.net tBVN00ol082907",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=vittgam.net;\n\ts=20150519; t=1451602802;\n\tbh=Nbf1ExMg0QZWXuGbbq5L4jlM2tPaLvgn5SzvZTxtNZQ=;\n\th=From:To:Date:Subject:Content-Type:Message-ID:In-Reply-To:\n\tReferences;\n\tb=U8FJF617QvtWFN+c2BusaWGIE2JsFXbVCCkvEdzXg/ZynWbx6teS0RUfpbG73qRYu\n\tuU4eprK31fM3U9bEPisupq/DIxw4SaGfKabO0LhjSNp+LpAZEZJ9DWesT1AAuS9LQr\n\t3nSaT/9maL7+qTa1grENzH0fTG3N/G5MQsTVuBBNG8RkwEM+enj0daIPo4hH5MYCCa\n\tm0kfDIZDTGFd5C/fKmm8oa5WCvUczjWocZidLLhy4xax/RazQXkGHMmblJyCBIpPj6\n\tZwidQc3k4Zfdx+OPtmM7a+7PpPQp9xsK+chsCzgtFT+FmAEEDXvzLXx1jK51O40Xl+\n\t5xHgAt6trst65sfQO7y0yJVD9BMMZ4o+uw4QpC6mz8oH+CG+Y1298lTRMf8KTdkScS\n\t9/6JrTXr73+2VUbA8/laR/d8ap4EsC89Ghy7eUXylBKRI8N/EWc7YT6QWGZQbXN0t1\n\tVM6ShII/qVhOVxkLh0PQcRXrctoMfc2wkxR6bpH8/9y4liKc7bqEPQq5jb+XAm/rNn\n\tR4wo0C/DqTdSC7SQPsp0lCYhWrbhjiR/CTnrqLuxhTbUaVhmWCXWsvkxi/6OaIRtQy\n\tiAoBhrCoIXzI3V8ss2K1agsIyaM35/QJ3v6gOgbwqBrp40IuO2xsLpzTdH9fU5xwv+\n\t4ni82IWaS77AMdnyqb/QPwLI=",
        "From": "\"Vittorio G (VittGam)\" <openwrt@vittgam.net>",
        "To": "<openwrt-devel@lists.openwrt.org>",
        "Date": "Fri, 01 Jan 2016 00:00:02 +0100",
        "Message-ID": "<owrt-patch-20160101-v4-3@vittgam.net>",
        "In-Reply-To": "<owrt-patch-20160101-v4-1@vittgam.net>",
        "References": "<owrt-patch-20160101-v4-1@vittgam.net>",
        "Subject": "[OpenWrt-Devel] [PATCH v4 3/4] ramips: Get rt3050 ethernet ports to\n\tbe disabled from the device tree.",
        "X-BeenThere": "openwrt-devel@lists.openwrt.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "OpenWrt Development List <openwrt-devel.lists.openwrt.org>",
        "List-Unsubscribe": "<https://lists.openwrt.org/cgi-bin/mailman/options/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.openwrt.org/pipermail/openwrt-devel/>",
        "List-Post": "<mailto:openwrt-devel@lists.openwrt.org>",
        "List-Help": "<mailto:openwrt-devel-request@lists.openwrt.org?subject=help>",
        "List-Subscribe": "<https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "openwrt-devel-bounces@lists.openwrt.org",
        "Sender": "\"openwrt-devel\" <openwrt-devel-bounces@lists.openwrt.org>"
    },
    "content": "This patch allows configuring ports to be disabled in the device tree; this\nsaves power, since disabling ports here actually disables power to ethernet\nPHYs.\n\nLine 443 enables all ethernet ports, so line 486 is getting zero ports to be\ndisabled, except for port 5 in SoCs where this is not implemented as it will\nbe sticky disabled in register POC0. Because of this, the code will still read\nthe switch configuration and OR it to the device tree setting.\n\nSigned-off-by: Vittorio Gambaletta <openwrt@vittgam.net>\n---",
    "diff": "--- /dev/null\n+++ b/target/linux/ramips/patches-4.3/0516-net-mediatek-get-rt3050-ethernet-ports-to-be-disable.patch\n@@ -0,0 +1,81 @@\n+From: Vittorio Gambaletta <openwrt@vittgam.net>\n+Date: Fri, 01 Jan 2016 00:00:02 +0100\n+Subject: [PATCH 3/3] net: mediatek: Get rt3050 ethernet ports to be disabled from the device tree.\n+\n+This patch allows configuring ports to be disabled in the device tree; this\n+saves power, since disabling ports here actually disables power to ethernet\n+PHYs.\n+\n+Line 443 enables all ethernet ports, so line 486 is getting zero ports to be\n+disabled, except for port 5 in SoCs where this is not implemented as it will\n+be sticky disabled in register POC0. Because of this, the code will still read\n+the switch configuration and OR it to the device tree setting.\n+\n+Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>\n+---\n+\n+--- a/drivers/net/ethernet/mediatek/esw_rt3050.c\n++++ b/drivers/net/ethernet/mediatek/esw_rt3050.c\n+@@ -10,6 +10,7 @@\n+  *   Copyright (C) 2009-2015 John Crispin <blogic@openwrt.org>\n+  *   Copyright (C) 2009-2015 Felix Fietkau <nbd@openwrt.org>\n+  *   Copyright (C) 2013-2015 Michael Lee <igvtee@gmail.com>\n++ *   Copyright (C) 2016 Vittorio Gambaletta <openwrt@vittgam.net>\n+  */\n+ \n+ #include <linux/module.h>\n+@@ -218,6 +219,7 @@ struct rt305x_esw {\n+ \tspinlock_t\t\treg_rw_lock;\n+ \n+ \tunsigned char\t\tport_map;\n++\tunsigned char\t\tport_disable;\n+ \tunsigned int\t\treg_led_polarity;\n+ \n+ \tstruct switch_dev\tswdev;\n+@@ -482,8 +484,14 @@ static void esw_hw_init(struct rt305x_es\n+ \tesw_w32(esw, 0x00000005, RT305X_ESW_REG_P3LED);\n+ \tesw_w32(esw, 0x00000005, RT305X_ESW_REG_P4LED);\n+ \n+-\t/* Copy disabled port configuration from bootloader setup */\n+-\tport_disable = esw_get_port_disable(esw);\n++\t/* Copy disabled port configuration from device tree setup */\n++\tport_disable = esw->port_disable;\n++\n++\t/* Disable nonexistent ports by reading the switch config\n++\t * after having enabled all possible ports above\n++\t */\n++\tport_disable |= esw_get_port_disable(esw);\n++\n+ \tfor (i = 0; i < 6; i++)\n+ \t\tesw->ports[i].disable = (port_disable & (1 << i)) != 0;\n+ \n+@@ -1329,7 +1337,7 @@ static int esw_probe(struct platform_dev\n+ {\n+ \tstruct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);\n+ \tstruct device_node *np = pdev->dev.of_node;\n+-\tconst __be32 *port_map, *reg_init;\n++\tconst __be32 *port_map, *port_disable, *reg_init;\n+ \tstruct switch_dev *swdev;\n+ \tstruct rt305x_esw *esw;\n+ \tstruct resource *irq;\n+@@ -1349,6 +1357,10 @@ static int esw_probe(struct platform_dev\n+ \tif (port_map)\n+ \t\tesw->port_map = be32_to_cpu(*port_map);\n+ \n++\tport_disable = of_get_property(np, \"mediatek,portdisable\", NULL);\n++\tif (port_disable)\n++\t\tesw->port_disable = be32_to_cpu(*port_disable);\n++\n+ \treg_init = of_get_property(np, \"mediatek,led_polarity\", NULL);\n+ \tif (reg_init)\n+ \t\tesw->reg_led_polarity = be32_to_cpu(*reg_init);\n+--- a/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt\n++++ b/Documentation/devicetree/bindings/net/ralink,rt3050-esw.txt\n+@@ -16,6 +16,7 @@ Required properties:\n+ Optional properties:\n+ - mediatek,portmap: can be used to choose if the default switch setup is\n+   llllw or wllll\n++- mediatek,portdisable: disable unused ethernet PHYs to save power\n+ - mediatek,led_polarity: override the active high/low settings of the leds\n+ \n+ Example:\n",
    "prefixes": [
        "OpenWrt-Devel",
        "v4",
        "3/4"
    ]
}