get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 804622,
    "url": "http://patchwork.ozlabs.org/api/patches/804622/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170822105754.29486-2-alice.michael@intel.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api",
        "name": "Intel Wired Ethernet development",
        "link_name": "intel-wired-lan",
        "list_id": "intel-wired-lan.osuosl.org",
        "list_email": "intel-wired-lan@osuosl.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170822105754.29486-2-alice.michael@intel.com>",
    "list_archive_url": null,
    "date": "2017-08-22T10:57:43",
    "name": "[next,S78-V8,01/12] i40e: Fix reporting of supported link modes",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "8bd8e7e2946ef8e1811aeb9a3ed5687c16c4b4be",
    "submitter": {
        "id": 71123,
        "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api",
        "name": "Michael, Alice",
        "email": "alice.michael@intel.com"
    },
    "delegate": {
        "id": 68,
        "url": "http://patchwork.ozlabs.org/api/users/68/?format=api",
        "username": "jtkirshe",
        "first_name": "Jeff",
        "last_name": "Kirsher",
        "email": "jeffrey.t.kirsher@intel.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170822105754.29486-2-alice.michael@intel.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/804622/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/804622/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@lists.osuosl.org"
        ],
        "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)",
        "Received": [
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\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 3xcKgn0SG2z9t1m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 23 Aug 2017 05:02:45 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6D8B387E16;\n\tTue, 22 Aug 2017 19:02:43 +0000 (UTC)",
            "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id ADAUFg6gEzXu; Tue, 22 Aug 2017 19:02:41 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 11D7C87E35;\n\tTue, 22 Aug 2017 19:02:41 +0000 (UTC)",
            "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id 1CF371C078A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Aug 2017 19:02:40 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 11640303D9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Aug 2017 19:02:40 +0000 (UTC)",
            "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id XqplQsn5TJFq for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Aug 2017 19:02:39 +0000 (UTC)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby silver.osuosl.org (Postfix) with ESMTPS id 1661B303CE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 22 Aug 2017 19:02:39 +0000 (UTC)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t22 Aug 2017 12:02:38 -0700",
            "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby orsmga005.jf.intel.com with ESMTP; 22 Aug 2017 12:02:38 -0700"
        ],
        "X-Virus-Scanned": [
            "amavisd-new at osuosl.org",
            "amavisd-new at osuosl.org"
        ],
        "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,413,1498546800\"; d=\"scan'208\";a=\"140827607\"",
        "From": "Alice Michael <alice.michael@intel.com>",
        "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org",
        "Date": "Tue, 22 Aug 2017 06:57:43 -0400",
        "Message-Id": "<20170822105754.29486-2-alice.michael@intel.com>",
        "X-Mailer": "git-send-email 2.9.4",
        "In-Reply-To": "<20170822105754.29486-1-alice.michael@intel.com>",
        "References": "<20170822105754.29486-1-alice.michael@intel.com>",
        "Cc": "Filip Sadowski <filip.sadowski@intel.com>",
        "Subject": "[Intel-wired-lan] [next PATCH S78-V8 01/12] i40e: Fix reporting of\n\tsupported link modes",
        "X-BeenThere": "intel-wired-lan@osuosl.org",
        "X-Mailman-Version": "2.1.18-1",
        "Precedence": "list",
        "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>",
        "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>",
        "List-Post": "<mailto:intel-wired-lan@osuosl.org>",
        "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>",
        "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "intel-wired-lan-bounces@osuosl.org",
        "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"
    },
    "content": "From: Filip Sadowski <filip.sadowski@intel.com>\n\nThis patch fixes incorrect reporting of supported link modes on some NICs.\n\nSigned-off-by: Filip Sadowski <filip.sadowski@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 20 ++++++++++++++++++--\n drivers/net/ethernet/intel/i40e/i40e_common.c       | 11 ++++++++++-\n drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 20 ++++++++++++++++++--\n 3 files changed, 46 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h\nindex e2a9ec8..5d0291c 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h\n@@ -1734,6 +1734,8 @@ enum i40e_aq_phy_type {\n \tI40E_PHY_TYPE_10GBASE_CR1_CU\t\t= 0xB,\n \tI40E_PHY_TYPE_10GBASE_AOC\t\t= 0xC,\n \tI40E_PHY_TYPE_40GBASE_AOC\t\t= 0xD,\n+\tI40E_PHY_TYPE_UNRECOGNIZED\t\t= 0xE,\n+\tI40E_PHY_TYPE_UNSUPPORTED\t\t= 0xF,\n \tI40E_PHY_TYPE_100BASE_TX\t\t= 0x11,\n \tI40E_PHY_TYPE_1000BASE_T\t\t= 0x12,\n \tI40E_PHY_TYPE_10GBASE_T\t\t\t= 0x13,\n@@ -1752,6 +1754,8 @@ enum i40e_aq_phy_type {\n \tI40E_PHY_TYPE_25GBASE_CR\t\t= 0x20,\n \tI40E_PHY_TYPE_25GBASE_SR\t\t= 0x21,\n \tI40E_PHY_TYPE_25GBASE_LR\t\t= 0x22,\n+\tI40E_PHY_TYPE_EMPTY\t\t\t= 0xFE,\n+\tI40E_PHY_TYPE_DEFAULT\t\t\t= 0xFF,\n \tI40E_PHY_TYPE_MAX\n };\n \n@@ -1942,19 +1946,31 @@ struct i40e_aqc_get_link_status {\n #define I40E_AQ_25G_SERDES_UCODE_ERR\t0X04\n #define I40E_AQ_25G_NIMB_UCODE_ERR\t0X05\n \tu8\tloopback; /* use defines from i40e_aqc_set_lb_mode */\n+/* Since firmware API 1.7 loopback field keeps power class info as well */\n+#define I40E_AQ_LOOPBACK_MASK\t\t0x07\n+#define I40E_AQ_PWR_CLASS_SHIFT_LB\t6\n+#define I40E_AQ_PWR_CLASS_MASK_LB\t(0x03 << I40E_AQ_PWR_CLASS_SHIFT_LB)\n \t__le16\tmax_frame_size;\n \tu8\tconfig;\n #define I40E_AQ_CONFIG_FEC_KR_ENA\t0x01\n #define I40E_AQ_CONFIG_FEC_RS_ENA\t0x02\n #define I40E_AQ_CONFIG_CRC_ENA\t\t0x04\n #define I40E_AQ_CONFIG_PACING_MASK\t0x78\n-\tu8\tpower_desc;\n+\tunion {\n+\t\tstruct {\n+\t\t\tu8\tpower_desc;\n #define I40E_AQ_LINK_POWER_CLASS_1\t0x00\n #define I40E_AQ_LINK_POWER_CLASS_2\t0x01\n #define I40E_AQ_LINK_POWER_CLASS_3\t0x02\n #define I40E_AQ_LINK_POWER_CLASS_4\t0x03\n #define I40E_AQ_PWR_CLASS_MASK\t\t0x03\n-\tu8\treserved[4];\n+\t\t\tu8\treserved[4];\n+\t\t};\n+\t\tstruct {\n+\t\t\tu8\tlink_type[4];\n+\t\t\tu8\tlink_type_ext;\n+\t\t};\n+\t};\n };\n \n I40E_CHECK_CMD_LENGTH(i40e_aqc_get_link_status);\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c\nindex e4e86e0..a10abf2 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c\n@@ -1826,7 +1826,7 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,\n \thw_link_info->fec_info = resp->config & (I40E_AQ_CONFIG_FEC_KR_ENA |\n \t\t\t\t\t\t I40E_AQ_CONFIG_FEC_RS_ENA);\n \thw_link_info->ext_info = resp->ext_info;\n-\thw_link_info->loopback = resp->loopback;\n+\thw_link_info->loopback = resp->loopback & I40E_AQ_LOOPBACK_MASK;\n \thw_link_info->max_frame_size = le16_to_cpu(resp->max_frame_size);\n \thw_link_info->pacing = resp->config & I40E_AQ_CONFIG_PACING_MASK;\n \n@@ -1857,6 +1857,15 @@ i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,\n \t     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)\n \t\thw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;\n \n+\tif (hw->aq.api_maj_ver == I40E_FW_API_VERSION_MAJOR &&\n+\t    hw->aq.api_min_ver >= 7) {\n+\t\t__le32 tmp;\n+\n+\t\tmemcpy(&tmp, resp->link_type, sizeof(tmp));\n+\t\thw->phy.phy_types = le32_to_cpu(tmp);\n+\t\thw->phy.phy_types |= ((u64)resp->link_type_ext << 32);\n+\t}\n+\n \t/* save link status information */\n \tif (link)\n \t\t*link = *hw_link_info;\ndiff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h\nindex f9f48d1..709d114 100644\n--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h\n+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h\n@@ -1730,6 +1730,8 @@ enum i40e_aq_phy_type {\n \tI40E_PHY_TYPE_10GBASE_CR1_CU\t\t= 0xB,\n \tI40E_PHY_TYPE_10GBASE_AOC\t\t= 0xC,\n \tI40E_PHY_TYPE_40GBASE_AOC\t\t= 0xD,\n+\tI40E_PHY_TYPE_UNRECOGNIZED\t\t= 0xE,\n+\tI40E_PHY_TYPE_UNSUPPORTED\t\t= 0xF,\n \tI40E_PHY_TYPE_100BASE_TX\t\t= 0x11,\n \tI40E_PHY_TYPE_1000BASE_T\t\t= 0x12,\n \tI40E_PHY_TYPE_10GBASE_T\t\t\t= 0x13,\n@@ -1748,6 +1750,8 @@ enum i40e_aq_phy_type {\n \tI40E_PHY_TYPE_25GBASE_CR\t\t= 0x20,\n \tI40E_PHY_TYPE_25GBASE_SR\t\t= 0x21,\n \tI40E_PHY_TYPE_25GBASE_LR\t\t= 0x22,\n+\tI40E_PHY_TYPE_EMPTY\t\t\t= 0xFE,\n+\tI40E_PHY_TYPE_DEFAULT\t\t\t= 0xFF,\n \tI40E_PHY_TYPE_MAX\n };\n \n@@ -1938,19 +1942,31 @@ struct i40e_aqc_get_link_status {\n #define I40E_AQ_25G_SERDES_UCODE_ERR\t0X04\n #define I40E_AQ_25G_NIMB_UCODE_ERR\t0X05\n \tu8\tloopback; /* use defines from i40e_aqc_set_lb_mode */\n+/* Since firmware API 1.7 loopback field keeps power class info as well */\n+#define I40E_AQ_LOOPBACK_MASK\t\t0x07\n+#define I40E_AQ_PWR_CLASS_SHIFT_LB\t6\n+#define I40E_AQ_PWR_CLASS_MASK_LB\t(0x03 << I40E_AQ_PWR_CLASS_SHIFT_LB)\n \t__le16\tmax_frame_size;\n \tu8\tconfig;\n #define I40E_AQ_CONFIG_FEC_KR_ENA\t0x01\n #define I40E_AQ_CONFIG_FEC_RS_ENA\t0x02\n #define I40E_AQ_CONFIG_CRC_ENA\t\t0x04\n #define I40E_AQ_CONFIG_PACING_MASK\t0x78\n-\tu8\tpower_desc;\n+\tunion {\n+\t\tstruct {\n+\t\t\tu8\tpower_desc;\n #define I40E_AQ_LINK_POWER_CLASS_1\t0x00\n #define I40E_AQ_LINK_POWER_CLASS_2\t0x01\n #define I40E_AQ_LINK_POWER_CLASS_3\t0x02\n #define I40E_AQ_LINK_POWER_CLASS_4\t0x03\n #define I40E_AQ_PWR_CLASS_MASK\t\t0x03\n-\tu8\treserved[4];\n+\t\t\tu8\treserved[4];\n+\t\t};\n+\t\tstruct {\n+\t\t\tu8\tlink_type[4];\n+\t\t\tu8\tlink_type_ext;\n+\t\t};\n+\t};\n };\n \n I40E_CHECK_CMD_LENGTH(i40e_aqc_get_link_status);\n",
    "prefixes": [
        "next",
        "S78-V8",
        "01/12"
    ]
}