get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 552994,
    "url": "http://patchwork.ozlabs.org/api/patches/552994/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/owrt-patch-20151205-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-20151205-2@vittgam.net>",
    "list_archive_url": null,
    "date": "2015-12-05T11:03:37",
    "name": "[OpenWrt-Devel,2/3] ramips: Get ethernet ports to be disabled from the device tree.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "150f6db20b6ede9b823ee957d9ca5e2b6b07e7b2",
    "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-20151205-2@vittgam.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/552994/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/552994/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 963DE140A68\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  5 Dec 2015 22:04:51 +1100 (AEDT)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id E20F5280AD4;\n\tSat,  5 Dec 2015 12:03:55 +0100 (CET)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 8004E280947\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tSat,  5 Dec 2015 12:03:47 +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,  5 Dec 2015 12:03:47 +0100 (CET)",
            "from mail2.vittgam.net (server2.tincvpn.vittgam.net [10.48.0.5])\n\tby mail.vittgam.net with ESMTP id tB5B3qpd198426\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);\n\tSat, 5 Dec 2015 12:03:52 +0100",
            "from vl2 (vl2.r12.network.mietitrebbia.rocks [10.48.6.146])\n\tby mail2.vittgam.net with SMTP id tB5B3BSu007669;\n\tSat, 5 Dec 2015 12:03:37 +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=eBjO/7Kn; 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: -7.6",
        "X-DKIM": "OpenDKIM Filter v2.4.2 mail.vittgam.net tB5B3qpd198426",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=vittgam.net;\n\ts=20150519; t=1449313432;\n\tbh=l51CkcyMeraPTIHBmL4IrCbBxPeIaMjTzaabWCMgnKs=;\n\th=Date:From:To:Subject:Content-Type:Message-ID;\n\tb=eBjO/7KnUuKgYlB6gmx8fG49GdGJ71itnMPYHgesaXP5na3vt662sDn/ccXtJXKYg\n\t/dJY8g6aMgp88gWccpTDXv723DFov8fdxRCRY8nNokvrvyu/EWhakH1mZgOebzUzIo\n\tsrJCaVGYdj6lcqnCVcsNms8TnkNYwMEK1O1fGQrHcZkt/BzAobV42UdPuU3Ar9Evbd\n\t9N0VX/BxXu5a3z9diEZTPXMN0t4Uj6L2GGw3+JeLA/TlBzpCHaWVQGDrmKrABE+o12\n\tElmViMdDWGGO+xwt7870slQ9OcyWrwrBVcChyhF0NH/Za2B9R2ZprFBMxEz1xPuUNt\n\tbrQcvJaTezWAU5D75bNWn1f+696stDIXBTT5Ji/Wra7QVCKFLH+t+43jevR0dRCQc6\n\trTI+oQ+bos79fqAP+mn+05U/beOqD1P0gRCBsuWMmtgGIaGXlBDqlxgHzQLt893dJf\n\tXCig963N9zNpthjbv5MwYeMrI5av2WT9rf8kn41tbzZGVX5E1tCPIRCvwtvA7v7Vax\n\tx845J7KMwrf3cbN3Jc3fTFDvPWG4yNkH4Q5h3+tBgW8r32k6plPsDe04gL6WuRuAkG\n\txWNr83Ya6QlMri2LF3F5QCbZzNEDEzpIR6KN3gDQYGyhBTJsPjWA9Vzp8OJRT3SQvW\n\tv6vUPhXAPF06AQdXqRwH1MQM=",
        "Date": "Sat, 5 Dec 2015 12:03:37 +0100",
        "From": "\"Vittorio G (VittGam)\" <openwrt@vittgam.net>",
        "To": "<openwrt-devel@lists.openwrt.org>",
        "Message-ID": "<owrt-patch-20151205-2@vittgam.net>",
        "Subject": "[OpenWrt-Devel] [PATCH 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\nalso the default for at least 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 \treg_init = of_get_property(np, \"ralink,portmap\", NULL);\n \tif (reg_init)\n \t\tesw->port_map = be32_to_cpu(*reg_init);\n+\n+\treg_init = of_get_property(np, \"ralink,portdisable\", NULL);\n+\tif (reg_init)\n+\t\tesw->port_disable = be32_to_cpu(*reg_init);\n \n \treg_init = of_get_property(np, \"ralink,fct2\", NULL);\n \tif (reg_init)\n",
    "prefixes": [
        "OpenWrt-Devel",
        "2/3"
    ]
}