get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 555936,
    "url": "http://patchwork.ozlabs.org/api/patches/555936/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/owrt-patch-20151212-2@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-20151212-2@vittgam.net>",
    "list_archive_url": null,
    "date": "2015-12-12T01:10:53",
    "name": "[OpenWrt-Devel,v2,2/3] ramips: Get ethernet ports to be disabled from the device tree.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "76e2f6e053f352690104b10143eaf75798a4713a",
    "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-20151212-2@vittgam.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/555936/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/555936/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 C63711402C0\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 12 Dec 2015 12:13:29 +1100 (AEDT)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id B59BC28BC47;\n\tSat, 12 Dec 2015 02:11:34 +0100 (CET)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 95689280AE8\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tSat, 12 Dec 2015 02:10:43 +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\tSat, 12 Dec 2015 02:10:43 +0100 (CET)",
            "from mail2.vittgam.net (server2.tincvpn.vittgam.net [10.48.0.5])\n\tby mail.vittgam.net with ESMTP id tBC1Arq2163380\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);\n\tSat, 12 Dec 2015 02:10:53 +0100",
            "from vl2 (vl2.r12.network.mietitrebbia.rocks [10.48.6.146])\n\tby mail2.vittgam.net with SMTP id tBC1Aq08015034;\n\tSat, 12 Dec 2015 02:10:53 +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=VmXnkT7j; 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 tBC1Arq2163380",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=vittgam.net;\n\ts=20150519; t=1449882654;\n\tbh=BZHMA6HcCXhZi4smK0vBKfy6dYeUYoQJDlH3aWEq/y8=;\n\th=Date:From:To:Subject:Content-Type:Message-ID;\n\tb=VmXnkT7jvTAPg4pbzXjGLgaApaSLJFWKIRb3tA2dW3EYj61hjCPT55zgvmbMzc83+\n\txzC42IosNU882zamGgptzMhyDKklCHYFzOzDKr/XvulUGR9ILQOCGw7igdSl4Pt7s7\n\tSdWmaheTL8w89I9Q0s9m3CQ96sPgRX78s7/F9js0S0/ntFLPmu67sC60lZCW3T63cj\n\tCfO+RSNPkkVSWeoSysizKE0VO/LVQ0jAV67s+rMZqKvcmVviDGXsr+0uO8aymx+jJZ\n\t/7dqAQwOs3SW4+zeBBfr5X7oRvaNJmu14mR/yF9VTERHHPs0Aapm8+qEcmpEjzWD37\n\t+gyvjbRo+k5Uqa0S9c9c4EJwRq4sqy8MngAT242RV3KoKwMk8fsyk8ykXsFR8NhMih\n\tQ5jWOBFiH5DmaCnLDfKFOYc5PmDkJbJ0ggvDoFlS2X/xx7DlTKc+turHPvo0k8YlIQ\n\ttWx8DTAn19hgkSvBq34bOcLSmfWNmTAc8eMSMZMBgF6vOvvsUSdQD7xEaLiZJFuqlF\n\t5XLK3Xfta/g1i9EF/0KvIFUSACWyPwb8/yqwt19WAkxNCnh2uPLi+6Yu1m4TkOY5E9\n\tWUyA/VykY2W4HVUT3t3UUoEMP/BE32HnnkuUECzGyXlELwTiZQMqxPOBJHd+5TGT0k\n\t7qT4FI2DwtYvKem5r3jf63Fo=",
        "Date": "Sat, 12 Dec 2015 02:10:53 +0100",
        "From": "\"Vittorio G (VittGam)\" <openwrt@vittgam.net>",
        "To": "<openwrt-devel@lists.openwrt.org>",
        "Message-ID": "<owrt-patch-20151212-2@vittgam.net>",
        "Subject": "[OpenWrt-Devel] [PATCH v2 2/3] ramips: Get ethernet ports to be\n\tdisabled 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": "Line 461 is actually enabling all switch ports, so line 508 is always getting\nzero ports to be disabled (except for port 5 in SoCs where this is not implemented,\nas it will be sticky disabled in register POC0).\n\nAlso, the bootloader on some routers sets all ports to disabled (which is\nthe case for at least one router based on RT5350).\n\nSo, this patch allows configuring ports to be disabled in the device tree.\n\nPower can be saved too this way, since disabling ports here actually disables\npower to ethernet PHYs.\n\nSigned-off-by: Vittorio Gambaletta <openwrt@vittgam.net>\n\n---\n\nPlease apply to both trunk and CC.",
    "diff": "--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c\n+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/esw_rt3052.c\n@@ -233,6 +233,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_initval_fct2;\n \tunsigned int\t\treg_initval_fpa2;\n \tunsigned int\t\treg_led_polarity;\n@@ -457,7 +458,7 @@ static void esw_hw_init(struct rt305x_esw *esw)\n \t\t      (RT305X_ESW_PORTS_ALL << RT305X_ESW_PFC1_EN_VLAN_S),\n \t\t      RT305X_ESW_REG_PFC1);\n \n-\t/* Enable Back Pressure, and Flow Control */\n+\t/* Enable all ports; enable Back Pressure and Flow Control */\n \tesw_w32(esw,\n \t\t      ((RT305X_ESW_PORTS_ALL << RT305X_ESW_POC0_EN_BP_S) |\n \t\t       (RT305X_ESW_PORTS_ALL << RT305X_ESW_POC0_EN_FC_S)),\n@@ -504,8 +505,9 @@ static void esw_hw_init(struct rt305x_esw *esw)\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+\tif (esw->port_disable)\n+\t\tport_disable = esw->port_disable;\n \tfor (i = 0; i < 6; i++)\n \t\tesw->ports[i].disable = (port_disable & (1 << i)) != 0;\n \n@@ -1419,6 +1421,10 @@ static int esw_probe(struct platform_device *pdev)\n \tport_map = of_get_property(np, \"ralink,portmap\", NULL);\n \tif (port_map)\n \t\tesw->port_map = be32_to_cpu(*port_map);\n+\n+\tport_map = of_get_property(np, \"ralink,portdisable\", NULL);\n+\tif (port_map)\n+\t\tesw->port_disable = be32_to_cpu(*port_map);\n \n \treg_init = of_get_property(np, \"ralink,fct2\", NULL);\n \tif (reg_init)\n",
    "prefixes": [
        "OpenWrt-Devel",
        "v2",
        "2/3"
    ]
}