get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 555969,
    "url": "http://patchwork.ozlabs.org/api/patches/555969/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/owrt-patch-20151212-v3-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-v3-2@vittgam.net>",
    "list_archive_url": null,
    "date": "2015-12-12T08:41:43",
    "name": "[OpenWrt-Devel,v3,2/3] ramips: Get ethernet ports to be disabled from the device tree.",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "85d2d48395b150c9ceea7e6881bca367b0690d42",
    "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-v3-2@vittgam.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/555969/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/555969/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 A82D51402D8\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 12 Dec 2015 19:44:24 +1100 (AEDT)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 397FF28AE0F;\n\tSat, 12 Dec 2015 09:42:17 +0100 (CET)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 0E13828A675\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tSat, 12 Dec 2015 09:41:34 +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 09:41:33 +0100 (CET)",
            "from mail2.vittgam.net (server2.tincvpn.vittgam.net [10.48.0.5])\n\tby mail.vittgam.net with ESMTP id tBC8fhN1174459\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);\n\tSat, 12 Dec 2015 09:41:44 +0100",
            "from vl2 (vl2.r12.network.mietitrebbia.rocks [10.48.6.146])\n\tby mail2.vittgam.net with SMTP id tBC8fgnZ029180;\n\tSat, 12 Dec 2015 09:41:43 +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=FDAU7xVr; 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 tBC8fhN1174459",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=vittgam.net;\n\ts=20150519; t=1449909704;\n\tbh=a0k7sriG7pm2/VtOvSz0FljDE/oUe6YHu/jJE2ilvvE=;\n\th=Date:From:To:Subject:Content-Type:Message-ID;\n\tb=FDAU7xVrGxuHLYDFf4xqlwj1OC5yQPznojybYKYIPn7WcflCWbklx8qhErmH1AnSP\n\tGYkjBgKgA6Dw2uWa/ED4S1JBQ3elUyQbgir90Cce6AAJHTkNw9Vdblgr2idc2dFhvQ\n\tmIPDRni9J7i6k6PuSOrCf6NwZY0RY25BcaJDS9rGGTnZ8f7fvYhjAer1ZS6TPHlino\n\tVQ7elDza5zYyWqDxj0DmbazhWHZaalXB7JPv//nDpSNPprQHEH5dtC7HryfgNaEyKj\n\t/GwLoKwrukuOos+43QCLBrrFSkpeHZl7BCCnTn8rttus4N+ym5S9CQEV8Gh68laCwF\n\taI5g79Y0eX3DPlRahChNs2/RoYX47HmD5rbgS/R0HpghdGolNq+/BMDTxX6foCxY9q\n\t9kjxE+GqmKiPyHwcAHytjGl6fS5fverd7wus2L7nUt9FD995Ym8i3EbVi7Ds41AVtQ\n\tq9gjTY9XM3R99HtZWJ1LvbFvspZzxjNb4803l/VbtmqHCZbabPk9HLypoH9EWSZZof\n\tOhZhcrVEKCszhZMIKqbYIss+19R7X/ZvbyuPar8ewaCz22324Wa2+SLLeucV4F7b+z\n\tE83Q5MR2hrWmGLsJIYwm7L04QWkFno9wMBGjGPqtfgvRaCvo/wgW7Ib+uebPYm+A20\n\t2/SAEmePwZk0J4vMy3nBKNJM=",
        "Date": "Sat, 12 Dec 2015 09:41:43 +0100",
        "From": "\"Vittorio G (VittGam)\" <openwrt@vittgam.net>",
        "To": "<openwrt-devel@lists.openwrt.org>",
        "Message-ID": "<owrt-patch-20151212-v3-2@vittgam.net>",
        "Subject": "[OpenWrt-Devel] [PATCH v3 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\n(v3 of this patch adds \"else port_disable = esw_get_port_disable(esw);\" anyway.)\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, 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,11 @@ 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+\telse\n+\t\tport_disable = esw_get_port_disable(esw);\n \tfor (i = 0; i < 6; i++)\n \t\tesw->ports[i].disable = (port_disable & (1 << i)) != 0;\n \n@@ -1373,7 +1377,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 +1423,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",
        "v3",
        "2/3"
    ]
}