Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1297380/?format=api
{ "id": 1297380, "url": "http://patchwork.ozlabs.org/api/patches/1297380/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200525150248.37783-1-sasha.neftin@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": "<20200525150248.37783-1-sasha.neftin@intel.com>", "list_archive_url": null, "date": "2020-05-25T15:02:48", "name": "[v3,1/1] igc: Add initial EEE support", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "b2b5d6de9c6dcb87a570f22b0aa545338bee48b2", "submitter": { "id": 69860, "url": "http://patchwork.ozlabs.org/api/people/69860/?format=api", "name": "Sasha Neftin", "email": "sasha.neftin@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/20200525150248.37783-1-sasha.neftin@intel.com/mbox/", "series": [ { "id": 179117, "url": "http://patchwork.ozlabs.org/api/series/179117/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=179117", "date": "2020-05-25T15:02:48", "name": "[v3,1/1] igc: Add initial EEE support", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/179117/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1297380/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1297380/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 spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49W0hN3PFHz9sTP\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 26 May 2020 01:02:58 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8397E88042;\n\tMon, 25 May 2020 15:02:56 +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 A9N3fPIYAw7u; Mon, 25 May 2020 15:02:54 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D158087D40;\n\tMon, 25 May 2020 15:02:54 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by ash.osuosl.org (Postfix) with ESMTP id 2A7C71BF2A7\n for <intel-wired-lan@lists.osuosl.org>; Mon, 25 May 2020 15:02:53 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by silver.osuosl.org (Postfix) with ESMTP id 0CEEE2038A\n for <intel-wired-lan@lists.osuosl.org>; Mon, 25 May 2020 15:02:53 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id 5W5l2YZnCq4j for <intel-wired-lan@lists.osuosl.org>;\n Mon, 25 May 2020 15:02:50 +0000 (UTC)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by silver.osuosl.org (Postfix) with ESMTPS id B59741FEBF\n for <intel-wired-lan@lists.osuosl.org>; Mon, 25 May 2020 15:02:50 +0000 (UTC)", "from orsmga001.jf.intel.com ([10.7.209.18])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 25 May 2020 08:02:49 -0700", "from ccdlinuxdev09.iil.intel.com ([143.185.160.241])\n by orsmga001.jf.intel.com with ESMTP; 25 May 2020 08:02:48 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "IronPort-SDR": [ "\n 0l1EPKiRy+Bd4lErfMe54HUFaGZiRqK6DIXvzvMOeUKBr06nDWdMSpyUSQdNk5sq/fhfRhyhOP\n 2333uKziVthA==", "\n zWJweMVeQVgp652aJISMh1RaetbQne//awtOwNFQ3l1d1Up6eRVbzXg5b2qsp2TJNTeisQ5V4T\n moevHjW5Wofg==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.73,433,1583222400\"; d=\"scan'208\";a=\"344908011\"", "From": "Sasha Neftin <sasha.neftin@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 25 May 2020 18:02:48 +0300", "Message-Id": "<20200525150248.37783-1-sasha.neftin@intel.com>", "X-Mailer": "git-send-email 2.11.0", "Subject": "[Intel-wired-lan] [PATCH v3 1/1] igc: Add initial EEE support", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "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>", "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": "IEEE802.3az-2010 Energy Efficient Ethernet has been\napproved as standard (September 2010) and the driver\ncan enable and disable it via ethtool.\nDisable the feature by default on parts which support it.\nAdd enable/disable eee options.\ntx-lpi, tx-timer and advertise not supported yet.\n\nv1-v2:\nRid of inverted logic and replace eee_disable boolean with\neee_enable in device specification.\nAddress community comments.\n\nv2-v3:\nRemove pointless ret_val from _set_eee method\nMinor comment fix\n\nSigned-off-by: Sasha Neftin <sasha.neftin@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc.h | 4 ++\n drivers/net/ethernet/intel/igc/igc_defines.h | 10 +++\n drivers/net/ethernet/intel/igc/igc_ethtool.c | 97 ++++++++++++++++++++++++++++\n drivers/net/ethernet/intel/igc/igc_hw.h | 1 +\n drivers/net/ethernet/intel/igc/igc_i225.c | 57 ++++++++++++++++\n drivers/net/ethernet/intel/igc/igc_i225.h | 2 +\n drivers/net/ethernet/intel/igc/igc_main.c | 16 +++++\n drivers/net/ethernet/intel/igc/igc_regs.h | 5 ++\n 8 files changed, 192 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h\nindex 5dbc5a156626..ce3ca6d4a6de 100644\n--- a/drivers/net/ethernet/intel/igc/igc.h\n+++ b/drivers/net/ethernet/intel/igc/igc.h\n@@ -117,6 +117,9 @@ struct igc_ring {\n struct igc_adapter {\n \tstruct net_device *netdev;\n \n+\tstruct ethtool_eee eee;\n+\tu16 eee_advert;\n+\n \tunsigned long state;\n \tunsigned int flags;\n \tunsigned int num_q_vectors;\n@@ -256,6 +259,7 @@ extern char igc_driver_version[];\n #define IGC_FLAG_MEDIA_RESET\t\tBIT(10)\n #define IGC_FLAG_MAS_ENABLE\t\tBIT(12)\n #define IGC_FLAG_HAS_MSIX\t\tBIT(13)\n+#define IGC_FLAG_EEE\t\t\tBIT(14)\n #define IGC_FLAG_VLAN_PROMISC\t\tBIT(15)\n #define IGC_FLAG_RX_LEGACY\t\tBIT(16)\n #define IGC_FLAG_TSN_QBV_ENABLED\tBIT(17)\ndiff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h\nindex 80b664e64465..a7baadc49d84 100644\n--- a/drivers/net/ethernet/intel/igc/igc_defines.h\n+++ b/drivers/net/ethernet/intel/igc/igc_defines.h\n@@ -512,4 +512,14 @@\n /* Maximum size of the MTA register table in all supported adapters */\n #define MAX_MTA_REG\t\t\t128\n \n+/* EEE defines */\n+#define IGC_IPCNFG_EEE_2_5G_AN\t\t0x00000010 /* IPCNFG EEE Ena 2.5G AN */\n+#define IGC_IPCNFG_EEE_1G_AN\t\t0x00000008 /* IPCNFG EEE Ena 1G AN */\n+#define IGC_IPCNFG_EEE_100M_AN\t\t0x00000004 /* IPCNFG EEE Ena 100M AN */\n+#define IGC_EEER_EEE_NEG\t\t0x20000000 /* EEE capability nego */\n+#define IGC_EEER_TX_LPI_EN\t\t0x00010000 /* EEER Tx LPI Enable */\n+#define IGC_EEER_RX_LPI_EN\t\t0x00020000 /* EEER Rx LPI Enable */\n+#define IGC_EEER_LPI_FC\t\t\t0x00040000 /* EEER Ena on Flow Cntrl */\n+#define IGC_EEE_SU_LPI_CLK_STP\t\t0x00800000 /* EEE LPI Clock Stop */\n+\n #endif /* _IGC_DEFINES_H_ */\ndiff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c\nindex 2214a5d3a259..2093921cf00a 100644\n--- a/drivers/net/ethernet/intel/igc/igc_ethtool.c\n+++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c\n@@ -4,6 +4,7 @@\n /* ethtool support for igc */\n #include <linux/if_vlan.h>\n #include <linux/pm_runtime.h>\n+#include <linux/mdio.h>\n \n #include \"igc.h\"\n #include \"igc_diag.h\"\n@@ -1549,6 +1550,100 @@ static int igc_ethtool_set_priv_flags(struct net_device *netdev, u32 priv_flags)\n \treturn 0;\n }\n \n+static int igc_ethtool_get_eee(struct net_device *netdev,\n+\t\t\t struct ethtool_eee *edata)\n+{\n+\tstruct igc_adapter *adapter = netdev_priv(netdev);\n+\tstruct igc_hw *hw = &adapter->hw;\n+\tu32 eeer;\n+\n+\tif (hw->dev_spec._base.eee_enable)\n+\t\tedata->advertised =\n+\t\t\tmmd_eee_adv_to_ethtool_adv_t(adapter->eee_advert);\n+\n+\t*edata = adapter->eee;\n+\tedata->supported = SUPPORTED_Autoneg;\n+\tnetdev_info(netdev,\n+\t\t \"Supported EEE link modes: 100baseT/Full, 1000baseT/Full, 2500baseT/Full\\n\");\n+\n+\teeer = rd32(IGC_EEER);\n+\n+\t/* EEE status on negotiated link */\n+\tif (eeer & IGC_EEER_EEE_NEG)\n+\t\tedata->eee_active = true;\n+\n+\tif (eeer & IGC_EEER_TX_LPI_EN)\n+\t\tedata->tx_lpi_enabled = true;\n+\n+\tedata->eee_enabled = hw->dev_spec._base.eee_enable;\n+\n+\tedata->advertised = SUPPORTED_Autoneg;\n+\tedata->lp_advertised = SUPPORTED_Autoneg;\n+\n+\t/* Report correct negotiated EEE status for devices that\n+\t * wrongly report EEE at half-duplex\n+\t */\n+\tif (adapter->link_duplex == HALF_DUPLEX) {\n+\t\tedata->eee_enabled = false;\n+\t\tedata->eee_active = false;\n+\t\tedata->tx_lpi_enabled = false;\n+\t\tedata->advertised &= ~edata->advertised;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int igc_ethtool_set_eee(struct net_device *netdev,\n+\t\t\t struct ethtool_eee *edata)\n+{\n+\tstruct igc_adapter *adapter = netdev_priv(netdev);\n+\tstruct igc_hw *hw = &adapter->hw;\n+\tstruct ethtool_eee eee_curr;\n+\ts32 ret_val;\n+\n+\tmemset(&eee_curr, 0, sizeof(struct ethtool_eee));\n+\n+\tret_val = igc_ethtool_get_eee(netdev, &eee_curr);\n+\tif (ret_val) {\n+\t\tnetdev_err(netdev,\n+\t\t\t \"Problem setting EEE advertisement options\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (eee_curr.eee_enabled) {\n+\t\tif (eee_curr.tx_lpi_enabled != edata->tx_lpi_enabled) {\n+\t\t\tnetdev_err(netdev,\n+\t\t\t\t \"Setting EEE tx-lpi is not supported\\n\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\n+\t\t/* Tx LPI timer is not implemented currently */\n+\t\tif (edata->tx_lpi_timer) {\n+\t\t\tnetdev_err(netdev,\n+\t\t\t\t \"Setting EEE Tx LPI timer is not supported\\n\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t} else if (!edata->eee_enabled) {\n+\t\tnetdev_err(netdev,\n+\t\t\t \"Setting EEE options are not supported with EEE disabled\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tadapter->eee_advert = ethtool_adv_to_mmd_eee_adv_t(edata->advertised);\n+\tif (hw->dev_spec._base.eee_enable != edata->eee_enabled) {\n+\t\thw->dev_spec._base.eee_enable = edata->eee_enabled;\n+\t\tadapter->flags |= IGC_FLAG_EEE;\n+\n+\t\t/* reset link */\n+\t\tif (netif_running(netdev))\n+\t\t\tigc_reinit_locked(adapter);\n+\t\telse\n+\t\t\tigc_reset(adapter);\n+\t}\n+\n+\treturn 0;\n+}\n+\n static int igc_ethtool_begin(struct net_device *netdev)\n {\n \tstruct igc_adapter *adapter = netdev_priv(netdev);\n@@ -1830,6 +1925,8 @@ static const struct ethtool_ops igc_ethtool_ops = {\n \t.set_channels\t\t= igc_ethtool_set_channels,\n \t.get_priv_flags\t\t= igc_ethtool_get_priv_flags,\n \t.set_priv_flags\t\t= igc_ethtool_set_priv_flags,\n+\t.get_eee = igc_ethtool_get_eee,\n+\t.set_eee = igc_ethtool_set_eee,\n \t.begin\t\t\t= igc_ethtool_begin,\n \t.complete\t\t= igc_ethtool_complete,\n \t.get_link_ksettings\t= igc_ethtool_get_link_ksettings,\ndiff --git a/drivers/net/ethernet/intel/igc/igc_hw.h b/drivers/net/ethernet/intel/igc/igc_hw.h\nindex af34ae310327..2ab7d9fab6af 100644\n--- a/drivers/net/ethernet/intel/igc/igc_hw.h\n+++ b/drivers/net/ethernet/intel/igc/igc_hw.h\n@@ -191,6 +191,7 @@ struct igc_fc_info {\n \n struct igc_dev_spec_base {\n \tbool clear_semaphore_once;\n+\tbool eee_enable;\n };\n \n struct igc_hw {\ndiff --git a/drivers/net/ethernet/intel/igc/igc_i225.c b/drivers/net/ethernet/intel/igc/igc_i225.c\nindex c25f555aaf82..37babff1a90e 100644\n--- a/drivers/net/ethernet/intel/igc/igc_i225.c\n+++ b/drivers/net/ethernet/intel/igc/igc_i225.c\n@@ -488,3 +488,60 @@ s32 igc_init_nvm_params_i225(struct igc_hw *hw)\n \t}\n \treturn 0;\n }\n+\n+/**\n+ * igc_set_eee_i225 - Enable/disable EEE support\n+ * @hw: pointer to the HW structure\n+ * @adv2p5G: boolean flag enabling 2.5G EEE advertisement\n+ * @adv1G: boolean flag enabling 1G EEE advertisement\n+ * @adv100M: boolean flag enabling 100M EEE advertisement\n+ *\n+ * Enable/disable EEE based on setting in dev_spec structure.\n+ *\n+ **/\n+s32 igc_set_eee_i225(struct igc_hw *hw, bool adv2p5G, bool adv1G,\n+\t\t bool adv100M)\n+{\n+\tu32 ipcnfg, eeer;\n+\n+\tipcnfg = rd32(IGC_IPCNFG);\n+\teeer = rd32(IGC_EEER);\n+\n+\t/* enable or disable per user setting */\n+\tif (hw->dev_spec._base.eee_enable) {\n+\t\tu32 eee_su = rd32(IGC_EEE_SU);\n+\n+\t\tif (adv100M)\n+\t\t\tipcnfg |= IGC_IPCNFG_EEE_100M_AN;\n+\t\telse\n+\t\t\tipcnfg &= ~IGC_IPCNFG_EEE_100M_AN;\n+\n+\t\tif (adv1G)\n+\t\t\tipcnfg |= IGC_IPCNFG_EEE_1G_AN;\n+\t\telse\n+\t\t\tipcnfg &= ~IGC_IPCNFG_EEE_1G_AN;\n+\n+\t\tif (adv2p5G)\n+\t\t\tipcnfg |= IGC_IPCNFG_EEE_2_5G_AN;\n+\t\telse\n+\t\t\tipcnfg &= ~IGC_IPCNFG_EEE_2_5G_AN;\n+\n+\t\teeer |= (IGC_EEER_TX_LPI_EN | IGC_EEER_RX_LPI_EN |\n+\t\t\tIGC_EEER_LPI_FC);\n+\n+\t\t/* This bit should not be set in normal operation. */\n+\t\tif (eee_su & IGC_EEE_SU_LPI_CLK_STP)\n+\t\t\thw_dbg(\"LPI Clock Stop Bit should not be set!\\n\");\n+\t} else {\n+\t\tipcnfg &= ~(IGC_IPCNFG_EEE_2_5G_AN | IGC_IPCNFG_EEE_1G_AN |\n+\t\t\tIGC_IPCNFG_EEE_100M_AN);\n+\t\teeer &= ~(IGC_EEER_TX_LPI_EN | IGC_EEER_RX_LPI_EN |\n+\t\t\tIGC_EEER_LPI_FC);\n+\t}\n+\twr32(IGC_IPCNFG, ipcnfg);\n+\twr32(IGC_EEER, eeer);\n+\trd32(IGC_IPCNFG);\n+\trd32(IGC_EEER);\n+\n+\treturn IGC_SUCCESS;\n+}\ndiff --git a/drivers/net/ethernet/intel/igc/igc_i225.h b/drivers/net/ethernet/intel/igc/igc_i225.h\nindex 7b66e1f9c0e6..04759e076a9e 100644\n--- a/drivers/net/ethernet/intel/igc/igc_i225.h\n+++ b/drivers/net/ethernet/intel/igc/igc_i225.h\n@@ -9,5 +9,7 @@ void igc_release_swfw_sync_i225(struct igc_hw *hw, u16 mask);\n \n s32 igc_init_nvm_params_i225(struct igc_hw *hw);\n bool igc_get_flash_presence_i225(struct igc_hw *hw);\n+s32 igc_set_eee_i225(struct igc_hw *hw, bool adv2p5G, bool adv1G,\n+\t\t bool adv100M);\n \n #endif\ndiff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c\nindex c4df7129f930..338582f61709 100644\n--- a/drivers/net/ethernet/intel/igc/igc_main.c\n+++ b/drivers/net/ethernet/intel/igc/igc_main.c\n@@ -105,6 +105,9 @@ void igc_reset(struct igc_adapter *adapter)\n \tif (hw->mac.ops.init_hw(hw))\n \t\tnetdev_err(dev, \"Error on hardware initialization\");\n \n+\t/* Re-establish EEE setting */\n+\tigc_set_eee_i225(hw, true, true, true);\n+\n \tif (!netif_running(adapter->netdev))\n \t\tigc_power_down_link(adapter);\n \n@@ -4259,6 +4262,15 @@ static void igc_watchdog_task(struct work_struct *work)\n \t\t\t\t (ctrl & IGC_CTRL_RFCE) ? \"RX\" :\n \t\t\t\t (ctrl & IGC_CTRL_TFCE) ? \"TX\" : \"None\");\n \n+\t\t\t/* disable EEE if enabled */\n+\t\t\tif ((adapter->flags & IGC_FLAG_EEE) &&\n+\t\t\t adapter->link_duplex == HALF_DUPLEX) {\n+\t\t\t\tnetdev_info(netdev,\n+\t\t\t\t\t \"EEE Disabled: unsupported at half duplex. Re-enable using ethtool when at full duplex\\n\");\n+\t\t\t\tadapter->hw.dev_spec._base.eee_enable = false;\n+\t\t\t\tadapter->flags &= ~IGC_FLAG_EEE;\n+\t\t\t}\n+\n \t\t\t/* check if SmartSpeed worked */\n \t\t\tigc_check_downshift(hw);\n \t\t\tif (phy->speed_downgraded)\n@@ -5190,6 +5202,10 @@ static int igc_probe(struct pci_dev *pdev,\n \tnetdev_info(netdev, \"MAC: %pM\", netdev->dev_addr);\n \n \tdev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_NEVER_SKIP);\n+\t/* Disable EEE for internal PHY devices */\n+\thw->dev_spec._base.eee_enable = false;\n+\tadapter->flags &= ~IGC_FLAG_EEE;\n+\tigc_set_eee_i225(hw, false, false, false);\n \n \tpm_runtime_put_noidle(&pdev->dev);\n \ndiff --git a/drivers/net/ethernet/intel/igc/igc_regs.h b/drivers/net/ethernet/intel/igc/igc_regs.h\nindex 7f999cfc9b39..9970242d0d75 100644\n--- a/drivers/net/ethernet/intel/igc/igc_regs.h\n+++ b/drivers/net/ethernet/intel/igc/igc_regs.h\n@@ -249,6 +249,11 @@\n /* Wake Up packet memory */\n #define IGC_WUPM_REG(_i)\t(0x05A00 + ((_i) * 4))\n \n+/* Energy Efficient Ethernet \"EEE\" registers */\n+#define IGC_EEER\t0x0E30 /* Energy Efficient Ethernet \"EEE\"*/\n+#define IGC_IPCNFG\t0x0E38 /* Internal PHY Configuration */\n+#define IGC_EEE_SU\t0x0E34 /* EEE Setup */\n+\n /* forward declaration */\n struct igc_hw;\n u32 igc_rd32(struct igc_hw *hw, u32 reg);\n", "prefixes": [ "v3", "1/1" ] }