Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/798929/?format=api
{ "id": 798929, "url": "http://patchwork.ozlabs.org/api/patches/798929/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20170807142839.60975-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": "<20170807142839.60975-2-alice.michael@intel.com>", "list_archive_url": null, "date": "2017-08-07T14:28:28", "name": "[next,S78-V6,01/12] i40e: Fix reporting of supported link modes", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "b90e03a28983ee844833bc8978cf99ed841de288", "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/20170807142839.60975-2-alice.michael@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/798929/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/798929/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.133; helo=hemlock.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\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 3xRC3b2pXVz9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 8 Aug 2017 08:33:15 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9FC7687CE7;\n\tMon, 7 Aug 2017 22:33:13 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id XsgUQ0GAj9+3; Mon, 7 Aug 2017 22:33:11 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D0A2E87CC8;\n\tMon, 7 Aug 2017 22:33:11 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id A2A951C2679\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Aug 2017 22:33:09 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 96D562FBD9\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Aug 2017 22:33:09 +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 3o0qJ-DLVXke for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Aug 2017 22:33:08 +0000 (UTC)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby silver.osuosl.org (Postfix) with ESMTPS id C40532F970\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 7 Aug 2017 22:33:08 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Aug 2017 15:33:08 -0700", "from unknown (HELO localhost.jf.intel.com) ([10.166.16.121])\n\tby orsmga003.jf.intel.com with ESMTP; 07 Aug 2017 15:33:07 -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,339,1498546800\"; d=\"scan'208\";\n\ta=\"1001084717\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Mon, 7 Aug 2017 10:28:28 -0400", "Message-Id": "<20170807142839.60975-2-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.4", "In-Reply-To": "<20170807142839.60975-1-alice.michael@intel.com>", "References": "<20170807142839.60975-1-alice.michael@intel.com>", "Cc": "Filip Sadowski <filip.sadowski@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S78-V6 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 | 8 +++++++-\n drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 20 ++++++++++++++++++--\n 3 files changed, 43 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 de1cd25..0477faa 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@@ -1754,6 +1756,8 @@ enum i40e_aq_phy_type {\n \tI40E_PHY_TYPE_25GBASE_LR\t\t= 0x22,\n \tI40E_PHY_TYPE_25GBASE_AOC\t\t= 0x23,\n \tI40E_PHY_TYPE_25GBASE_ACC\t\t= 0x24,\n+\tI40E_PHY_TYPE_EMPTY\t\t\t= 0xFE,\n+\tI40E_PHY_TYPE_DEFAULT\t\t\t= 0xFF,\n \n \tI40E_PHY_TYPE_MAX\n };\n@@ -1947,19 +1951,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 6104c44..37bac74 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_common.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c\n@@ -1828,7 +1828,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@@ -1859,6 +1859,12 @@ 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\thw->phy.phy_types = le32_to_cpu(*(__le32 *)resp->link_type);\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 7d382c1..e2581c6 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@@ -1750,6 +1752,8 @@ enum i40e_aq_phy_type {\n \tI40E_PHY_TYPE_25GBASE_LR\t\t= 0x22,\n \tI40E_PHY_TYPE_25GBASE_AOC\t\t= 0x23,\n \tI40E_PHY_TYPE_25GBASE_ACC\t\t= 0x24,\n+\tI40E_PHY_TYPE_EMPTY\t\t\t= 0xFE,\n+\tI40E_PHY_TYPE_DEFAULT\t\t\t= 0xFF,\n \n \tI40E_PHY_TYPE_MAX\n };\n@@ -1943,19 +1947,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-V6", "01/12" ] }