get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 816578,
    "url": "http://patchwork.ozlabs.org/api/patches/816578/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170920225214.21974-2-f.fainelli@gmail.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": "<20170920225214.21974-2-f.fainelli@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-20T22:52:13",
    "name": "[net,1/2] net: ethtool: Add back transceiver type",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "084e77e7d55e5ab86d8f69f4054ae439c9473e7b",
    "submitter": {
        "id": 2800,
        "url": "http://patchwork.ozlabs.org/api/people/2800/?format=api",
        "name": "Florian Fainelli",
        "email": "f.fainelli@gmail.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/20170920225214.21974-2-f.fainelli@gmail.com/mbox/",
    "series": [
        {
            "id": 4252,
            "url": "http://patchwork.ozlabs.org/api/series/4252/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=4252",
            "date": "2017-09-20T22:52:12",
            "name": "Bring back transceiver type for PHYLIB",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/4252/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816578/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816578/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>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"mG2jSE34\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyFPQ5khbz9sBZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 21 Sep 2017 08:52:26 +1000 (AEST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752004AbdITWwY (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 20 Sep 2017 18:52:24 -0400",
            "from mail-qk0-f195.google.com ([209.85.220.195]:34615 \"EHLO\n\tmail-qk0-f195.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751647AbdITWwW (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 20 Sep 2017 18:52:22 -0400",
            "by mail-qk0-f195.google.com with SMTP id d70so2596285qkc.1\n\tfor <netdev@vger.kernel.org>; Wed, 20 Sep 2017 15:52:21 -0700 (PDT)",
            "from fainelli-desktop.broadcom.com ([192.19.255.250])\n\tby smtp.gmail.com with ESMTPSA id c1sm11823qkg.55.2017.09.20.15.52.19\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 20 Sep 2017 15:52:20 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=8L5AGW9UxeDeTBWLyqOzLuP2XqgA+eMte/pLjjs32JI=;\n\tb=mG2jSE34GFOOmr3FVEviq+kQbjHzobK/H1FzBNB6yx2i5H4PnvxkTpe01RDr6s3NH1\n\tSTwsflkHLdDvZLiGukDtJ+bkl2eEsfurfzUzsMUbjCYqrrDUAOjRh81p2cc6g1d9YcOF\n\tD3jTSEnkm1W3dC4wb1VLt8oFTQ0aFCh8nRhR47XW3wiCy7QQoUL+cR9fMb5NXCC7BW/k\n\t4xmFQg1XeWpRpNsQfrD0xRy4u4xOK1/eAJBGVpihDOD9q0E1sII4zdC6a1ZCU/yoRAGo\n\tSVfrKoL2lCbxMEnxZ83L+Sx7hNRlDM7IBOr3Z3btM/akxes5thCD+fAfna+s6B56szEi\n\tc41g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=8L5AGW9UxeDeTBWLyqOzLuP2XqgA+eMte/pLjjs32JI=;\n\tb=WQu6V3TOBbtFabGRup47LbfTJhpHLxInNIO+NAcNtkNdwsKlqy8fq1fiGJg388Z9af\n\tLEVEjAanf9XmKTJ6i+an87+ZlJin16gs4wXTPxiQyXaMucqA/0fT+t/TGo8cbA08vGKd\n\tnzOBW1+fHGjrMR509uCNE8S+Jhd4aUeSGZdvwbrKratoq9d/90PhaPyx5Ev99MRBdosg\n\t+ZD8yQYBfDZ+0DLUje0LGFY4UmpaEuqt16GtxGEr68XjxzikIXg8MGmClM5tObokKRnX\n\tXWlzPWpgvVJR+NkBlf9VIITnU3gjSKw5R1Av3iYIlZFndlOAaL5UpCr29BJ79VuWvT+D\n\tkSoA==",
        "X-Gm-Message-State": "AHPjjUi+eHXEcCBH38fR4Ro4VBXD9fGwpDheltqNwMLsnKVbFjrObZmw\n\tSnWgn04PswDli6COu9mLmOGYhiXQ",
        "X-Google-Smtp-Source": "AOwi7QBXZPHTLN1SHvjM2LTmjQOpQwo0huyawvHOmfcVurFAhmv0hn6wC6J732HC/RZAV+sPvxMK3Q==",
        "X-Received": "by 10.55.203.149 with SMTP id u21mr368941qkl.327.1505947941289; \n\tWed, 20 Sep 2017 15:52:21 -0700 (PDT)",
        "From": "Florian Fainelli <f.fainelli@gmail.com>",
        "To": "netdev@vger.kernel.org",
        "Cc": "davem@davemloft.net, linville@tuxdriver.com, decot@googlers.com,\n\ttremyfr@gmail.com, andrew@lunn.ch,\n\tFlorian Fainelli <f.fainelli@gmail.com>",
        "Subject": "[PATCH net 1/2] net: ethtool: Add back transceiver type",
        "Date": "Wed, 20 Sep 2017 15:52:13 -0700",
        "Message-Id": "<20170920225214.21974-2-f.fainelli@gmail.com>",
        "X-Mailer": "git-send-email 2.9.3",
        "In-Reply-To": "<20170920225214.21974-1-f.fainelli@gmail.com>",
        "References": "<20170920225214.21974-1-f.fainelli@gmail.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "Commit 3f1ac7a700d0 (\"net: ethtool: add new ETHTOOL_xLINKSETTINGS API\")\ndeprecated the ethtool_cmd::transceiver field, which was fine in\npremise, except that the PHY library was actually using it to report the\ntype of transceiver: internal or external.\n\nUse the first word of the reserved field to put this __u8 transceiver\nfield back in. It is made read-only, and we don't expect the\nETHTOOL_xLINKSETTINGS API to be doing anything with this anyway, so this\nis mostly for the legacy path where we do:\n\nethtool_get_settings()\n-> dev->ethtool_ops->get_link_ksettings()\n   -> convert_link_ksettings_to_legacy_settings()\n\nto have no information loss compared to the legacy get_settings API.\n\nFixes: 3f1ac7a700d0 (\"net: ethtool: add new ETHTOOL_xLINKSETTINGS API\")\nSigned-off-by: Florian Fainelli <f.fainelli@gmail.com>\n---\n include/uapi/linux/ethtool.h | 6 +++++-\n net/core/ethtool.c           | 2 ++\n 2 files changed, 7 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h\nindex 9c041dae8e2c..5bd1b1de4ea0 100644\n--- a/include/uapi/linux/ethtool.h\n+++ b/include/uapi/linux/ethtool.h\n@@ -1753,6 +1753,8 @@ enum ethtool_reset_flags {\n  *\t%ethtool_link_mode_bit_indices for the link modes, and other\n  *\tlink features that the link partner advertised through\n  *\tautonegotiation; 0 if unknown or not applicable.  Read-only.\n+ * @transceiver: Used to distinguish different possible PHY types,\n+ *\treported consistently by PHYLIB.  Read-only.\n  *\n  * If autonegotiation is disabled, the speed and @duplex represent the\n  * fixed link mode and are writable if the driver supports multiple\n@@ -1804,7 +1806,9 @@ struct ethtool_link_settings {\n \t__u8\teth_tp_mdix;\n \t__u8\teth_tp_mdix_ctrl;\n \t__s8\tlink_mode_masks_nwords;\n-\t__u32\treserved[8];\n+\t__u8\ttransceiver;\n+\t__u8\treserved1[3];\n+\t__u32\treserved[7];\n \t__u32\tlink_mode_masks[0];\n \t/* layout of link_mode_masks fields:\n \t * __u32 map_supported[link_mode_masks_nwords];\ndiff --git a/net/core/ethtool.c b/net/core/ethtool.c\nindex 6a582ae4c5d9..3228411ada0f 100644\n--- a/net/core/ethtool.c\n+++ b/net/core/ethtool.c\n@@ -525,6 +525,8 @@ convert_link_ksettings_to_legacy_settings(\n \t\t= link_ksettings->base.eth_tp_mdix;\n \tlegacy_settings->eth_tp_mdix_ctrl\n \t\t= link_ksettings->base.eth_tp_mdix_ctrl;\n+\tlegacy_settings->transceiver\n+\t\t= link_ksettings->base.transceiver;\n \treturn retval;\n }\n \n",
    "prefixes": [
        "net",
        "1/2"
    ]
}