Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2186742/?format=api
{ "id": 2186742, "url": "http://patchwork.ozlabs.org/api/patches/2186742/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260120134434.1931602-7-jedrzej.jagielski@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": "<20260120134434.1931602-7-jedrzej.jagielski@intel.com>", "list_archive_url": null, "date": "2026-01-20T13:44:34", "name": "[iwl-next,v2,6/6] ixgbe: E610: add EEE support", "commit_ref": null, "pull_url": null, "state": "under-review", "archived": false, "hash": "1bd0ead25cdcdbc40b5afa26ebe85cc6d9e76134", "submitter": { "id": 81850, "url": "http://patchwork.ozlabs.org/api/people/81850/?format=api", "name": "Jedrzej Jagielski", "email": "jedrzej.jagielski@intel.com" }, "delegate": { "id": 109701, "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api", "username": "anguy11", "first_name": "Anthony", "last_name": "Nguyen", "email": "anthony.l.nguyen@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260120134434.1931602-7-jedrzej.jagielski@intel.com/mbox/", "series": [ { "id": 489069, "url": "http://patchwork.ozlabs.org/api/series/489069/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=489069", "date": "2026-01-20T13:44:28", "name": "ixgbe: enable EEE for E610 devices", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/489069/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2186742/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2186742/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@legolas.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=lulZW6I8;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4dwTYL3BVmz1xsg\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 21 Jan 2026 01:02:46 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id CDD476FE31;\n\tTue, 20 Jan 2026 14:02:39 +0000 (UTC)", "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id IcDcUOgPCZUe; Tue, 20 Jan 2026 14:02:39 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id E91F66FE43;\n\tTue, 20 Jan 2026 14:02:38 +0000 (UTC)", "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by lists1.osuosl.org (Postfix) with ESMTP id 0EA43160\n for <intel-wired-lan@lists.osuosl.org>; Tue, 20 Jan 2026 14:02:37 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id E773B6FE52\n for <intel-wired-lan@lists.osuosl.org>; Tue, 20 Jan 2026 14:02:36 +0000 (UTC)", "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id NmDvev8GGOJT for <intel-wired-lan@lists.osuosl.org>;\n Tue, 20 Jan 2026 14:02:35 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [192.198.163.13])\n by smtp3.osuosl.org (Postfix) with ESMTPS id AB8DD6FE3B\n for <intel-wired-lan@lists.osuosl.org>; Tue, 20 Jan 2026 14:02:35 +0000 (UTC)", "from fmviesa004.fm.intel.com ([10.60.135.144])\n by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 20 Jan 2026 06:02:35 -0800", "from os-delivery.igk.intel.com ([10.102.18.218])\n by fmviesa004.fm.intel.com with ESMTP; 20 Jan 2026 06:02:34 -0800" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp3.osuosl.org E91F66FE43", "OpenDKIM Filter v2.11.0 smtp3.osuosl.org AB8DD6FE3B" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1768917759;\n\tbh=bh1RWipvkZqfqUcIiA+CtmzStYfKz6CsZhAteFHCevE=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=lulZW6I88a7LWXFCmdQ/4Ym7L8N/6rYLrAXGJadFeZleCFz07eGdKRDWY6ryuICju\n\t HtMObZrNP5cEwqW43uGO0TxP8G2n7tlV3rKkfsRrMaK+JGfvptvkDbz4VKyU2ReQyX\n\t KY9EcmR0HgeTkcDn1p5eanhYtDRX8e/LydCKAUCzhRTOMUu89eDw3406bdAj2WqNCL\n\t lxsVLn3xWGvnyBOei1fKRQvixA1PbO/6tO4CoBgYSyp2YrjzhX3qQQkrdsbLqJ/Bm+\n\t 59s87C1oY8taCU4hveOgWHc1yBHQkAuJvvwjUMOgcvmSOh/A964IelFapG4LmBf1rO\n\t u0Av5EoipAJPQ==", "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.13;\n helo=mgamail.intel.com; envelope-from=jedrzej.jagielski@intel.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org AB8DD6FE3B", "X-CSE-ConnectionGUID": [ "hWqZ1p3ZQ72BAf+EiW465A==", "sUCTT2O7SAyZnrMiOgq3mQ==" ], "X-CSE-MsgGUID": [ "Ncv6om3yQnCKVox2SZ2U2w==", "NWu3HeNwQmCqVixRY2Vx8A==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11676\"; a=\"72711793\"", "E=Sophos;i=\"6.21,240,1763452800\"; d=\"scan'208\";a=\"72711793\"", "E=Sophos;i=\"6.21,240,1763452800\"; d=\"scan'208\";a=\"210978977\"" ], "X-ExtLoop1": "1", "From": "Jedrzej Jagielski <jedrzej.jagielski@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Cc": "anthony.l.nguyen@intel.com, netdev@vger.kernel.org,\n Jedrzej Jagielski <jedrzej.jagielski@intel.com>,\n Aleksandr Loktionov <aleksandr.loktionov@intel.com>", "Date": "Tue, 20 Jan 2026 14:44:34 +0100", "Message-Id": "<20260120134434.1931602-7-jedrzej.jagielski@intel.com>", "X-Mailer": "git-send-email 2.31.1", "In-Reply-To": "<20260120134434.1931602-1-jedrzej.jagielski@intel.com>", "References": "<20260120134434.1931602-1-jedrzej.jagielski@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1768917755; x=1800453755;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=c3wTneRn/63MhMwZxOvqlh2YqVZIDxaN722tVWa8hsY=;\n b=kIXCVz9mAWZxE0ukcTU/7u+7PSgQW5x7wbTFBIe90byPPOLja8v2zDsS\n MaQFxaydPENNpeXAX+e4b2D5GQWS9AYfNf97fedLiB4ihZs3Dy4F3MHkp\n QuvaNSfiqhv97QP1Cw0uhgdoMONHPLmEaSBqsA6vXPFOXa/SMjsjjTms6\n t99CoAXHTJTJkAf5H0mPGgbPThWlp8DBHqhaNa7SwfpqkMKf+GtJbnW4c\n yAgkane1/bSyGkXo043TYTCd+kJwZMeLgiuvStoiuFwuNf4cDgUSj7pCf\n 45f7t4z7TksAP2z2NobOLeanACmLrD9wRoV6x1qPncQ62sjHDrmibDLfp\n Q==;", "X-Mailman-Original-Authentication-Results": [ "smtp3.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com", "smtp3.osuosl.org;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.a=rsa-sha256 header.s=Intel header.b=kIXCVz9m" ], "Subject": "[Intel-wired-lan] [PATCH iwl-next v2 6/6] ixgbe: E610: add EEE\n support", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <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 <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "Add E610 specific implementation of .get_eee() and .set_eee() ethtool\ncallbacks.\n\nIntroduce ixgbe_setup_eee_e610() which is used to set EEE config\non E610 device via ixgbe_aci_set_phy_cfg() (0x0601 ACI command).\nAssign it to dedicated mac operation.\n\nE610 devices support EEE feature specifically for 2.5, 5 and 10G link\nspeeds. When user try to set EEE for unsupported speeds log it.\n\nSetting timer and setting EEE advertised speeds are not yet supported.\n\nEEE shall be enabled by default for E610 devices.\n\nAdd EEE statuis logging during link watchdog run.\n\nReviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\nSigned-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>\n---\nv2: get rid of setting unsupported speeds from ixgbe_setup_eee_e610();\n remove 10Mb EEE case; remove EEE control (Andrew)\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c | 40 +++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h | 1 +\n .../net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 145 +++++++++++++++++-\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 30 +++-\n drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 +\n 5 files changed, 212 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c\nindex 8a3d8000a79c..3b941906b502 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.c\n@@ -2013,6 +2013,45 @@ int ixgbe_identify_phy_e610(struct ixgbe_hw *hw)\n \treturn 0;\n }\n \n+/**\n+ * ixgbe_setup_eee_e610 - Enable/disable EEE support\n+ * @hw: pointer to the HW structure\n+ * @enable_eee: boolean flag to enable EEE\n+ *\n+ * Enable/disable EEE based on @enable_eee.\n+ *\n+ * Return: the exit code of the operation.\n+ */\n+int ixgbe_setup_eee_e610(struct ixgbe_hw *hw, bool enable_eee)\n+{\n+\tstruct ixgbe_aci_cmd_get_phy_caps_data phy_caps = {};\n+\tstruct ixgbe_aci_cmd_set_phy_cfg_data phy_cfg = {};\n+\tu16 eee_cap = 0;\n+\tint err;\n+\n+\terr = ixgbe_aci_get_phy_caps(hw, false,\n+\t\tIXGBE_ACI_REPORT_ACTIVE_CFG, &phy_caps);\n+\tif (err)\n+\t\treturn err;\n+\n+\tixgbe_copy_phy_caps_to_cfg(&phy_caps, &phy_cfg);\n+\tphy_cfg.caps |= (IXGBE_ACI_PHY_ENA_LINK |\n+\t\t\tIXGBE_ACI_PHY_ENA_AUTO_LINK_UPDT);\n+\n+\tif (enable_eee) {\n+\t\tif (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_2_5GB_FULL)\n+\t\t\teee_cap |= IXGBE_ACI_PHY_EEE_EN_2_5GBASE_T;\n+\t\tif (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_5GB_FULL)\n+\t\t\teee_cap |= IXGBE_ACI_PHY_EEE_EN_5GBASE_T;\n+\t\tif (hw->phy.eee_speeds_advertised & IXGBE_LINK_SPEED_10GB_FULL)\n+\t\t\teee_cap |= IXGBE_ACI_PHY_EEE_EN_10GBASE_T;\n+\t}\n+\n+\tphy_cfg.eee_cap = cpu_to_le16(eee_cap);\n+\n+\treturn ixgbe_aci_set_phy_cfg(hw, &phy_cfg);\n+}\n+\n /**\n * ixgbe_identify_module_e610 - Identify SFP module type\n * @hw: pointer to hardware structure\n@@ -4026,6 +4065,7 @@ static const struct ixgbe_mac_operations mac_ops_e610 = {\n \t.fw_rollback_mode\t\t= ixgbe_fw_rollback_mode_e610,\n \t.get_nvm_ver\t\t\t= ixgbe_get_active_nvm_ver,\n \t.get_link_capabilities\t\t= ixgbe_get_link_capabilities_e610,\n+\t.setup_eee\t\t\t= ixgbe_setup_eee_e610,\n \t.get_bus_info\t\t\t= ixgbe_get_bus_info_generic,\n \t.acquire_swfw_sync\t\t= ixgbe_acquire_swfw_sync_X540,\n \t.release_swfw_sync\t\t= ixgbe_release_swfw_sync_X540,\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h\nindex 11916b979d28..2cb76a3d30ae 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_e610.h\n@@ -55,6 +55,7 @@ int ixgbe_init_phy_ops_e610(struct ixgbe_hw *hw);\n int ixgbe_identify_phy_e610(struct ixgbe_hw *hw);\n int ixgbe_identify_module_e610(struct ixgbe_hw *hw);\n int ixgbe_setup_phy_link_e610(struct ixgbe_hw *hw);\n+int ixgbe_setup_eee_e610(struct ixgbe_hw *hw, bool enable_eee);\n int ixgbe_set_phy_power_e610(struct ixgbe_hw *hw, bool on);\n int ixgbe_enter_lplu_e610(struct ixgbe_hw *hw);\n int ixgbe_init_eeprom_params_e610(struct ixgbe_hw *hw);\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\nindex b5b9b9335d52..020b97556ef7 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c\n@@ -12,6 +12,7 @@\n #include <linux/ethtool.h>\n #include <linux/vmalloc.h>\n #include <linux/highmem.h>\n+#include <linux/string_choices.h>\n #include <linux/uaccess.h>\n \n #include \"ixgbe.h\"\n@@ -3539,7 +3540,7 @@ static const struct {\n \t{ IXGBE_LINK_SPEED_10_FULL, ETHTOOL_LINK_MODE_10baseT_Full_BIT },\n \t{ IXGBE_LINK_SPEED_100_FULL, ETHTOOL_LINK_MODE_100baseT_Full_BIT },\n \t{ IXGBE_LINK_SPEED_1GB_FULL, ETHTOOL_LINK_MODE_1000baseT_Full_BIT },\n-\t{ IXGBE_LINK_SPEED_2_5GB_FULL, ETHTOOL_LINK_MODE_2500baseX_Full_BIT },\n+\t{ IXGBE_LINK_SPEED_2_5GB_FULL, ETHTOOL_LINK_MODE_2500baseT_Full_BIT },\n \t{ IXGBE_LINK_SPEED_5GB_FULL, ETHTOOL_LINK_MODE_5000baseT_Full_BIT },\n \t{ IXGBE_LINK_SPEED_10GB_FULL, ETHTOOL_LINK_MODE_10000baseT_Full_BIT },\n };\n@@ -3556,6 +3557,17 @@ static const struct {\n \t{ FW_PHY_ACT_UD_2_10G_KR_EEE, ETHTOOL_LINK_MODE_10000baseKR_Full_BIT},\n };\n \n+static const struct {\n+\tu16 eee_cap_bit;\n+\tu32 link_mode;\n+} ixgbe_eee_cap_map[] = {\n+\t{ IXGBE_ACI_PHY_EEE_EN_100BASE_TX, ETHTOOL_LINK_MODE_100baseT_Full_BIT },\n+\t{ IXGBE_ACI_PHY_EEE_EN_1000BASE_T, ETHTOOL_LINK_MODE_1000baseT_Full_BIT },\n+\t{ IXGBE_ACI_PHY_EEE_EN_10GBASE_T, ETHTOOL_LINK_MODE_10000baseT_Full_BIT },\n+\t{ IXGBE_ACI_PHY_EEE_EN_5GBASE_T, ETHTOOL_LINK_MODE_5000baseT_Full_BIT },\n+\t{ IXGBE_ACI_PHY_EEE_EN_2_5GBASE_T, ETHTOOL_LINK_MODE_2500baseT_Full_BIT },\n+};\n+\n static int ixgbe_validate_keee(struct net_device *netdev,\n \t\t\t struct ethtool_keee *keee_requested)\n {\n@@ -3597,6 +3609,133 @@ static int ixgbe_validate_keee(struct net_device *netdev,\n \treturn 0;\n }\n \n+/**\n+ * ixgbe_is_eee_link_speed_supported_e610 - Check if EEE can be enabled\n+ * @adapter: pointer to the adapter struct\n+ *\n+ * Check whether current link configuration is capable of enabling EEE feature.\n+ *\n+ * E610 specific function - for other adapters supporting EEE there might be\n+ * no such limitation.\n+ *\n+ * Return: true if EEE can be enabled, false otherwise.\n+ */\n+static bool\n+ixgbe_is_eee_link_speed_supported_e610(struct ixgbe_adapter *adapter)\n+{\n+\tswitch (adapter->link_speed) {\n+\tcase IXGBE_LINK_SPEED_10GB_FULL:\n+\tcase IXGBE_LINK_SPEED_2_5GB_FULL:\n+\tcase IXGBE_LINK_SPEED_5GB_FULL:\n+\t\treturn true;\n+\tcase IXGBE_LINK_SPEED_100_FULL:\n+\tcase IXGBE_LINK_SPEED_1GB_FULL:\n+\t\te_dev_info(\"Energy Efficient Ethernet (EEE) feature is not supported on link speeds equal to or below 1Gbps. EEE is supported on speeds above 1Gbps.\\n\");\n+\t\tfallthrough;\n+\tdefault:\n+\t\treturn false;\n+\t}\n+}\n+\n+static int ixgbe_get_eee_e610(struct net_device *netdev,\n+\t\t\t struct ethtool_keee *kedata)\n+{\n+\tstruct ixgbe_adapter *adapter = ixgbe_from_netdev(netdev);\n+\tstruct ixgbe_aci_cmd_get_phy_caps_data pcaps;\n+\tstruct ixgbe_hw *hw = &adapter->hw;\n+\tstruct ixgbe_link_status link;\n+\tu16 eee_cap;\n+\tint err;\n+\n+\tlinkmode_zero(kedata->lp_advertised);\n+\tlinkmode_zero(kedata->supported);\n+\tlinkmode_zero(kedata->advertised);\n+\n+\terr = ixgbe_aci_get_link_info(hw, true, &link);\n+\tif (err)\n+\t\treturn err;\n+\n+\terr = ixgbe_aci_get_phy_caps(hw, false, IXGBE_ACI_REPORT_ACTIVE_CFG,\n+\t\t\t\t &pcaps);\n+\tif (err)\n+\t\treturn err;\n+\n+\tkedata->eee_active = link.eee_status & IXGBE_ACI_LINK_EEE_ACTIVE;\n+\tkedata->eee_enabled = link.eee_status & IXGBE_ACI_LINK_EEE_ENABLED;\n+\n+\t/* for E610 devices EEE enablement implies TX LPI enablement */\n+\tkedata->tx_lpi_enabled = kedata->eee_enabled;\n+\n+\tif (kedata->eee_enabled)\n+\t\tkedata->tx_lpi_timer = le16_to_cpu(pcaps.eee_entry_delay);\n+\n+\teee_cap = le16_to_cpu(pcaps.eee_cap);\n+\n+\tfor (int i = 0; i < ARRAY_SIZE(ixgbe_eee_cap_map); i++) {\n+\t\tif (eee_cap & ixgbe_eee_cap_map[i].eee_cap_bit)\n+\t\t\tlinkmode_set_bit(ixgbe_eee_cap_map[i].link_mode,\n+\t\t\t\t\t kedata->lp_advertised);\n+\t}\n+\n+\tfor (int i = 0; i < ARRAY_SIZE(ixgbe_ls_map); i++) {\n+\t\tif (hw->phy.eee_speeds_supported &\n+\t\t ixgbe_ls_map[i].mac_speed)\n+\t\t\tlinkmode_set_bit(ixgbe_ls_map[i].link_mode,\n+\t\t\t\t\t kedata->supported);\n+\n+\t\tif (hw->phy.eee_speeds_advertised &\n+\t\t ixgbe_ls_map[i].mac_speed)\n+\t\t\tlinkmode_set_bit(ixgbe_ls_map[i].link_mode,\n+\t\t\t\t\t kedata->advertised);\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int ixgbe_set_eee_e610(struct net_device *netdev,\n+\t\t\t struct ethtool_keee *kedata)\n+{\n+\tstruct ixgbe_adapter *adapter = ixgbe_from_netdev(netdev);\n+\tstruct ixgbe_hw *hw = &adapter->hw;\n+\tint err;\n+\n+\terr = ixgbe_validate_keee(netdev, kedata);\n+\n+\tif (err == -EALREADY) {\n+\t\treturn 0;\n+\t} else if (err) {\n+\t\tif (err == -EOPNOTSUPP)\n+\t\t\te_dev_info(\"Energy Efficient Ethernet (EEE) feature is currently not supported on this device, please update the device NVM to the latest and try again\");\n+\t\treturn err;\n+\t}\n+\n+\tif (!(ixgbe_is_eee_link_speed_supported_e610(adapter)) &&\n+\t kedata->eee_enabled)\n+\t\treturn -EOPNOTSUPP;\n+\n+\thw->phy.eee_speeds_advertised = kedata->eee_enabled ?\n+\t\t\t\t\thw->phy.eee_speeds_supported : 0;\n+\n+\terr = hw->mac.ops.setup_eee(hw, kedata->eee_enabled);\n+\tif (err) {\n+\t\te_dev_err(\"Setting EEE %s failed.\\n\",\n+\t\t\t str_on_off(kedata->eee_enabled));\n+\t\treturn err;\n+\t}\n+\n+\tif (kedata->eee_enabled)\n+\t\tadapter->flags2 |= IXGBE_FLAG2_EEE_ENABLED;\n+\telse\n+\t\tadapter->flags2 &= ~IXGBE_FLAG2_EEE_ENABLED;\n+\n+\tif (netif_running(netdev))\n+\t\tixgbe_reinit_locked(adapter);\n+\telse\n+\t\tixgbe_reset(adapter);\n+\n+\treturn 0;\n+}\n+\n static int\n ixgbe_get_eee_fw(struct ixgbe_adapter *adapter, struct ethtool_keee *edata)\n {\n@@ -3823,8 +3962,8 @@ static const struct ethtool_ops ixgbe_ethtool_ops_e610 = {\n \t.set_rxfh\t\t= ixgbe_set_rxfh,\n \t.get_rxfh_fields\t= ixgbe_get_rxfh_fields,\n \t.set_rxfh_fields\t= ixgbe_set_rxfh_fields,\n-\t.get_eee\t\t= ixgbe_get_eee,\n-\t.set_eee\t\t= ixgbe_set_eee,\n+\t.get_eee\t\t= ixgbe_get_eee_e610,\n+\t.set_eee\t\t= ixgbe_set_eee_e610,\n \t.get_channels\t\t= ixgbe_get_channels,\n \t.set_channels\t\t= ixgbe_set_channels,\n \t.get_priv_flags\t\t= ixgbe_get_priv_flags,\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex c58051e4350b..b2bd34b53bf2 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -6748,6 +6748,7 @@ void ixgbe_down(struct ixgbe_adapter *adapter)\n \n /**\n * ixgbe_set_eee_capable - helper function to determine EEE support on X550\n+ * and E610\n * @adapter: board private structure\n */\n static void ixgbe_set_eee_capable(struct ixgbe_adapter *adapter)\n@@ -6764,6 +6765,20 @@ static void ixgbe_set_eee_capable(struct ixgbe_adapter *adapter)\n \t\t\tbreak;\n \t\tadapter->flags2 |= IXGBE_FLAG2_EEE_ENABLED;\n \t\tbreak;\n+\tcase IXGBE_DEV_ID_E610_BACKPLANE:\n+\tcase IXGBE_DEV_ID_E610_SFP:\n+\tcase IXGBE_DEV_ID_E610_10G_T:\n+\tcase IXGBE_DEV_ID_E610_2_5G_T:\n+\t\tif (hw->dev_caps.common_cap.eee_support &&\n+\t\t hw->phy.eee_speeds_supported) {\n+\t\t\tadapter->flags2 |= IXGBE_FLAG2_EEE_CAPABLE;\n+\t\t\t/* For E610 adapters EEE should be enabled by default\n+\t\t\t * if the feature is supported by FW.\n+\t\t\t */\n+\t\t\tadapter->flags2 |= IXGBE_FLAG2_EEE_ENABLED;\n+\t\t\tbreak;\n+\t\t}\n+\t\tfallthrough;\n \tdefault:\n \t\tadapter->flags2 &= ~IXGBE_FLAG2_EEE_CAPABLE;\n \t\tadapter->flags2 &= ~IXGBE_FLAG2_EEE_ENABLED;\n@@ -8074,6 +8089,7 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)\n \tstruct net_device *netdev = adapter->netdev;\n \tstruct ixgbe_hw *hw = &adapter->hw;\n \tu32 link_speed = adapter->link_speed;\n+\tstruct ethtool_keee keee = {};\n \tconst char *speed_str;\n \tbool flow_rx, flow_tx;\n \n@@ -8114,6 +8130,8 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)\n \tif (test_bit(__IXGBE_PTP_RUNNING, &adapter->state))\n \t\tixgbe_ptp_start_cyclecounter(adapter);\n \n+\tnetdev->ethtool_ops->get_eee(netdev, &keee);\n+\n \tswitch (link_speed) {\n \tcase IXGBE_LINK_SPEED_10GB_FULL:\n \t\tspeed_str = \"10 Gbps\";\n@@ -8137,10 +8155,11 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)\n \t\tspeed_str = \"unknown speed\";\n \t\tbreak;\n \t}\n-\te_info(drv, \"NIC Link is Up %s, Flow Control: %s\\n\", speed_str,\n+\te_info(drv, \"NIC Link is Up %s, Flow Control: %s, EEE: %s\\n\", speed_str,\n \t ((flow_rx && flow_tx) ? \"RX/TX\" :\n \t (flow_rx ? \"RX\" :\n-\t (flow_tx ? \"TX\" : \"None\"))));\n+\t (flow_tx ? \"TX\" : \"None\"))),\n+\t str_on_off(keee.eee_enabled));\n \n \tnetif_carrier_on(netdev);\n \tixgbe_check_vf_rate_limit(adapter);\n@@ -11995,6 +12014,13 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \tif (err)\n \t\tgoto err_netdev;\n \n+\tif (hw->mac.type == ixgbe_mac_e610 &&\n+\t (adapter->flags2 & IXGBE_FLAG2_EEE_CAPABLE)) {\n+\t\tbool eee_enable = adapter->flags2 & IXGBE_FLAG2_EEE_ENABLED;\n+\n+\t\thw->mac.ops.setup_eee(hw, eee_enable);\n+\t}\n+\n \tixgbe_devlink_init_regions(adapter);\n \tdevl_register(adapter->devlink);\n \tdevl_unlock(adapter->devlink);\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\nindex 94e00ab96692..4b8c439df2e2 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h\n@@ -3524,6 +3524,7 @@ struct ixgbe_mac_operations {\n \tint (*get_link_capabilities)(struct ixgbe_hw *, ixgbe_link_speed *,\n \t\t\t\t bool *);\n \tvoid (*set_rate_select_speed)(struct ixgbe_hw *, ixgbe_link_speed);\n+\tint (*setup_eee)(struct ixgbe_hw *hw, bool enable_eee);\n \n \t/* Packet Buffer Manipulation */\n \tvoid (*set_rxpba)(struct ixgbe_hw *, int, u32, int);\n", "prefixes": [ "iwl-next", "v2", "6/6" ] }