get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 817629,
    "url": "http://patchwork.ozlabs.org/api/patches/817629/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170922161753.19563-4-vivien.didelot@savoirfairelinux.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170922161753.19563-4-vivien.didelot@savoirfairelinux.com>",
    "list_archive_url": null,
    "date": "2017-09-22T16:17:52",
    "name": "[net-next,3/4] net: dsa: make slave close symmetrical to open",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "d9c34b1c307f0c43a8b5adb752e93e11aa4eec05",
    "submitter": {
        "id": 15889,
        "url": "http://patchwork.ozlabs.org/api/people/15889/?format=api",
        "name": "Vivien Didelot",
        "email": "vivien.didelot@savoirfairelinux.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170922161753.19563-4-vivien.didelot@savoirfairelinux.com/mbox/",
    "series": [
        {
            "id": 4666,
            "url": "http://patchwork.ozlabs.org/api/series/4666/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4666",
            "date": "2017-09-22T16:17:53",
            "name": "net: dsa: simplify port enabling",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/4666/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/817629/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/817629/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xzJfM3X64z9s7g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 23 Sep 2017 02:22:19 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752415AbdIVQWE (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 22 Sep 2017 12:22:04 -0400",
            "from mail.savoirfairelinux.com ([208.88.110.44]:39482 \"EHLO\n\tmail.savoirfairelinux.com\" rhost-flags-OK-OK-OK-OK) by\n\tvger.kernel.org with ESMTP id S1752571AbdIVQVh (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 22 Sep 2017 12:21:37 -0400",
            "from localhost (localhost [127.0.0.1])\n\tby mail.savoirfairelinux.com (Postfix) with ESMTP id 0C3B99C2AB0;\n\tFri, 22 Sep 2017 12:21:37 -0400 (EDT)",
            "from mail.savoirfairelinux.com ([127.0.0.1])\n\tby localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new,\n\tport 10032)\n\twith ESMTP id Wt87pVBTF7xW; Fri, 22 Sep 2017 12:21:35 -0400 (EDT)",
            "from localhost (localhost [127.0.0.1])\n\tby mail.savoirfairelinux.com (Postfix) with ESMTP id 661D89C2D14;\n\tFri, 22 Sep 2017 12:21:35 -0400 (EDT)",
            "from mail.savoirfairelinux.com ([127.0.0.1])\n\tby localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new,\n\tport 10026)\n\twith ESMTP id 7UyodiLFdVzJ; Fri, 22 Sep 2017 12:21:35 -0400 (EDT)",
            "from weeman.mtl.sfl (unknown [192.168.49.192])\n\tby mail.savoirfairelinux.com (Postfix) with ESMTPSA id 2EFCF9C2CF4;\n\tFri, 22 Sep 2017 12:21:35 -0400 (EDT)"
        ],
        "X-Virus-Scanned": "amavisd-new at mail.savoirfairelinux.com",
        "From": "Vivien Didelot <vivien.didelot@savoirfairelinux.com>",
        "To": "netdev@vger.kernel.org",
        "Cc": "linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com,\n\t\"David S. Miller\" <davem@davemloft.net>,\n\tFlorian Fainelli <f.fainelli@gmail.com>, Andrew Lunn <andrew@lunn.ch>,\n\tVivien Didelot <vivien.didelot@savoirfairelinux.com>",
        "Subject": "[PATCH net-next 3/4] net: dsa: make slave close symmetrical to open",
        "Date": "Fri, 22 Sep 2017 12:17:52 -0400",
        "Message-Id": "<20170922161753.19563-4-vivien.didelot@savoirfairelinux.com>",
        "X-Mailer": "git-send-email 2.14.1",
        "In-Reply-To": "<20170922161753.19563-1-vivien.didelot@savoirfairelinux.com>",
        "References": "<20170922161753.19563-1-vivien.didelot@savoirfairelinux.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "The DSA slave open function configures the unicast MAC addresses on the\nmaster device, enable the switch port, change its STP state, then start\nthe PHY device.\n\nMake the close function symmetric, by first stopping the PHY device,\nthen changing the STP state, disabling the switch port and restore the\nmaster device.\n\nSigned-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>\n---\n net/dsa/slave.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/net/dsa/slave.c b/net/dsa/slave.c\nindex 6290741e496a..235a5c95dfcc 100644\n--- a/net/dsa/slave.c\n+++ b/net/dsa/slave.c\n@@ -144,6 +144,11 @@ static int dsa_slave_close(struct net_device *dev)\n \tif (p->phy)\n \t\tphy_stop(p->phy);\n \n+\tdsa_port_set_state_now(p->dp, BR_STATE_DISABLED);\n+\n+\tif (ds->ops->port_disable)\n+\t\tds->ops->port_disable(ds, p->dp->index);\n+\n \tdev_mc_unsync(master, dev);\n \tdev_uc_unsync(master, dev);\n \tif (dev->flags & IFF_ALLMULTI)\n@@ -154,11 +159,6 @@ static int dsa_slave_close(struct net_device *dev)\n \tif (!ether_addr_equal(dev->dev_addr, master->dev_addr))\n \t\tdev_uc_del(master, dev->dev_addr);\n \n-\tif (ds->ops->port_disable)\n-\t\tds->ops->port_disable(ds, p->dp->index);\n-\n-\tdsa_port_set_state_now(p->dp, BR_STATE_DISABLED);\n-\n \treturn 0;\n }\n \n",
    "prefixes": [
        "net-next",
        "3/4"
    ]
}