get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808593,
    "url": "http://patchwork.ozlabs.org/api/patches/808593/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170901090455.32316-3-antoine.tenart@free-electrons.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": "<20170901090455.32316-3-antoine.tenart@free-electrons.com>",
    "list_archive_url": null,
    "date": "2017-09-01T09:04:53",
    "name": "[net-next,v2,2/4] net: mvpp2: make the phy optional",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8d1319589061ac55f6d40275407aa22914884cee",
    "submitter": {
        "id": 61603,
        "url": "http://patchwork.ozlabs.org/api/people/61603/?format=api",
        "name": "Antoine Tenart",
        "email": "antoine.tenart@free-electrons.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/20170901090455.32316-3-antoine.tenart@free-electrons.com/mbox/",
    "series": [
        {
            "id": 979,
            "url": "http://patchwork.ozlabs.org/api/series/979/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=979",
            "date": "2017-09-01T09:04:53",
            "name": "net: mvpp2: optional PHYs and GoP link irq",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/979/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808593/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808593/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 3xkCxt5WKZz9t2r\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 19:05:22 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751715AbdIAJFE (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tFri, 1 Sep 2017 05:05:04 -0400",
            "from mail.free-electrons.com ([62.4.15.54]:45331 \"EHLO\n\tmail.free-electrons.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751526AbdIAJFC (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Fri, 1 Sep 2017 05:05:02 -0400",
            "by mail.free-electrons.com (Postfix, from userid 110)\n\tid BB952209AD; Fri,  1 Sep 2017 11:05:00 +0200 (CEST)",
            "from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr\n\t[90.63.216.87])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 8E8402099C;\n\tFri,  1 Sep 2017 11:05:00 +0200 (CEST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0",
        "From": "Antoine Tenart <antoine.tenart@free-electrons.com>",
        "To": "davem@davemloft.net",
        "Cc": "Antoine Tenart <antoine.tenart@free-electrons.com>, andrew@lunn.ch,\n\tgregory.clement@free-electrons.com,\n\tthomas.petazzoni@free-electrons.com, nadavh@marvell.com,\n\tlinux@armlinux.org.uk, linux-kernel@vger.kernel.org,\n\tmw@semihalf.com, stefanc@marvell.com,\n\tmiquel.raynal@free-electrons.com, netdev@vger.kernel.org",
        "Subject": "[PATCH net-next v2 2/4] net: mvpp2: make the phy optional",
        "Date": "Fri,  1 Sep 2017 11:04:53 +0200",
        "Message-Id": "<20170901090455.32316-3-antoine.tenart@free-electrons.com>",
        "X-Mailer": "git-send-email 2.13.5",
        "In-Reply-To": "<20170901090455.32316-1-antoine.tenart@free-electrons.com>",
        "References": "<20170901090455.32316-1-antoine.tenart@free-electrons.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "There is not necessarily a PHY between the GoP and the physical port.\nHowever, the driver currently makes the \"phy\" property mandatory,\ncontrary to what is stated in the device tree bindings. This patch makes\nthe PHY optional, and aligns the PPv2 driver on its device tree\ndocumentation. However if a PHY is provided, the GoP link interrupt\nwon't be used.\n\nWith this patch switches directly connected to the serdes lanes and SFP\nports on the Armada 8040-db and Armada 7040-db can be used if the link\ninterrupt is described in the device tree.\n\nSigned-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>\nTested-by: Marcin Wojtas <mw@semihalf.com>\n---\n drivers/net/ethernet/marvell/mvpp2.c | 19 +++++++++++--------\n 1 file changed, 11 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c\nindex f93d3a332c60..b4d4759ddc25 100644\n--- a/drivers/net/ethernet/marvell/mvpp2.c\n+++ b/drivers/net/ethernet/marvell/mvpp2.c\n@@ -6475,7 +6475,8 @@ static void mvpp2_start_dev(struct mvpp2_port *port)\n \n \tmvpp2_port_mii_set(port);\n \tmvpp2_port_enable(port);\n-\tphy_start(ndev->phydev);\n+\tif (ndev->phydev)\n+\t\tphy_start(ndev->phydev);\n \tnetif_tx_start_all_queues(port->dev);\n }\n \n@@ -6501,7 +6502,8 @@ static void mvpp2_stop_dev(struct mvpp2_port *port)\n \n \tmvpp2_egress_disable(port);\n \tmvpp2_port_disable(port);\n-\tphy_stop(ndev->phydev);\n+\tif (ndev->phydev)\n+\t\tphy_stop(ndev->phydev);\n \tphy_power_off(port->comphy);\n }\n \n@@ -6558,6 +6560,10 @@ static int mvpp2_phy_connect(struct mvpp2_port *port)\n {\n \tstruct phy_device *phy_dev;\n \n+\t/* No PHY is attached */\n+\tif (!port->phy_node)\n+\t\treturn 0;\n+\n \tphy_dev = of_phy_connect(port->dev, port->phy_node, mvpp2_link_event, 0,\n \t\t\t\t port->phy_interface);\n \tif (!phy_dev) {\n@@ -6578,6 +6584,9 @@ static void mvpp2_phy_disconnect(struct mvpp2_port *port)\n {\n \tstruct net_device *ndev = port->dev;\n \n+\tif (!ndev->phydev)\n+\t\treturn;\n+\n \tphy_disconnect(ndev->phydev);\n }\n \n@@ -7366,12 +7375,6 @@ static int mvpp2_port_probe(struct platform_device *pdev,\n \t\treturn -ENOMEM;\n \n \tphy_node = of_parse_phandle(port_node, \"phy\", 0);\n-\tif (!phy_node) {\n-\t\tdev_err(&pdev->dev, \"missing phy\\n\");\n-\t\terr = -ENODEV;\n-\t\tgoto err_free_netdev;\n-\t}\n-\n \tphy_mode = of_get_phy_mode(port_node);\n \tif (phy_mode < 0) {\n \t\tdev_err(&pdev->dev, \"incorrect phy mode\\n\");\n",
    "prefixes": [
        "net-next",
        "v2",
        "2/4"
    ]
}