get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 561995,
    "url": "http://patchwork.ozlabs.org/api/patches/561995/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/owrt-patch-20160101-v4-cc-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-cc-3@vittgam.net>",
    "list_archive_url": null,
    "date": "2015-12-31T23:00:06",
    "name": "[OpenWrt-Devel,v4,3/4,CC] ramips: Get rt3052 ethernet ports to be disabled from the device tree.",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "44c07bd5cbe1398677b234ee33097ee391d98c5b",
    "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-cc-3@vittgam.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/561995/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/561995/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 F0E3E140BF1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Jan 2016 10:05:17 +1100 (AEDT)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id CBCBA28C01C;\n\tFri,  1 Jan 2016 00:00:43 +0100 (CET)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id A79B028BE69\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tThu, 31 Dec 2015 23:59:46 +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:40 +0100 (CET)",
            "from vl2 (vittgamlaptop2.r1.network.mietitrebbia.rocks\n\t[10.48.3.146]) by mail.vittgam.net with SMTP id tBVN00op082907;\n\tFri, 1 Jan 2016 00:00:04 +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=Tp8OUn83; 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 tBVN00op082907",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=vittgam.net;\n\ts=20150519; t=1451602804;\n\tbh=Yfhr4rIaDux/NW1wN8KUfbUHCzfV7szXNNIGXX1Ij2w=;\n\th=From:To:Date:Subject:Content-Type:Message-ID:In-Reply-To:\n\tReferences;\n\tb=Tp8OUn834EHGeUtY6hlQmTLhL+uKND3ceOugU9gT6dryfC5IfYA7WI6rgwsU69lwX\n\tImKNuWBcJmd1P/umbFre79hzKJU6xLAkbFrJxN2hGH2RC2wcPsNF80hrNaPyHF8FI3\n\tfs82HwA1BY1YdKDMDKar6MN6fNpnRV8HNzeKWtWHNxFCmFMX/3A5Hi8hACyPiqG0R4\n\toeBLjen0T3b1a0W5oSNjv+vwTYqC9v7M+3y4uL0G2RWeXlkcUxBakz2w7Qe3+WY4Q5\n\tyZ9JqgDlpDjuq031X4kzR3y5F2INg0Od8YZZJ4aZrlxl+eRAQS47D09FKQDmt9YaH/\n\ts+gXU0WjnlfqrqMgZJwnsR84B0iRQ8TBx+gRFw2CmSwSQQjaySn00krWho39Pr5KxQ\n\twoIoI72xLlpJTJbQ4fnwx1a+pl40Lqnkj6k+tTLkyeIbpjs6gpUnWW1VKZ2YqeUiS/\n\tVrUk2xd89SEPWEnqGgAaLzBzF2m8UWc5FA38HY+RSwj7oV5ZGYIKBBtQssgIsxldoT\n\tNhFd4IJ5wNYtzQChoeyK17PrA178e0V2Vn5ErH1MxNI7tC7uHXVvR7+YZRmsvfkugj\n\tsbKfpzLbopmhJiwVF7bE8dMcP/yIzBtoWIqiPsGUrEkFFLYkIBdZb0SM34bSawnUVZ\n\tGD84BXfKIsGM/o7IJpBx+VvQ=",
        "From": "\"Vittorio G (VittGam)\" <openwrt@vittgam.net>",
        "To": "<openwrt-devel@lists.openwrt.org>",
        "Date": "Fri, 01 Jan 2016 00:00:06 +0100",
        "Message-ID": "<owrt-patch-20160101-v4-cc-3@vittgam.net>",
        "In-Reply-To": "<owrt-patch-20160101-v4-cc-1@vittgam.net>",
        "References": "<owrt-patch-20160101-v4-cc-1@vittgam.net>",
        "Subject": "[OpenWrt-Devel] [PATCH v4 3/4] [CC] ramips: Get rt3052 ethernet\n\tports to be 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 461 enables all ethernet ports, so line 508 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": "--- 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@@ -504,8 +505,14 @@ 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+\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@@ -1373,7 +1380,7 @@ static int esw_probe(struct platform_device *pdev)\n {\n \tstruct device_node *np = pdev->dev.of_node;\n \tconst struct rt305x_esw_platform_data *pdata;\n-\tconst __be32 *port_map, *reg_init;\n+\tconst __be32 *port_map, *port_disable, *reg_init;\n \tstruct rt305x_esw *esw;\n \tstruct switch_dev *swdev;\n \tstruct resource *res, *irq;\n@@ -1419,6 +1426,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_disable = of_get_property(np, \"ralink,portdisable\", NULL);\n+\tif (port_disable)\n+\t\tesw->port_disable = be32_to_cpu(*port_disable);\n \n \treg_init = of_get_property(np, \"ralink,fct2\", NULL);\n \tif (reg_init)\n",
    "prefixes": [
        "OpenWrt-Devel",
        "v4",
        "3/4",
        "CC"
    ]
}