[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201204200920.133780-5-mario.limonciello@dell.com>
Date: Fri, 4 Dec 2020 14:09:17 -0600
From: Mario Limonciello <mario.limonciello@...l.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
Tony Nguyen <anthony.l.nguyen@...el.com>,
intel-wired-lan@...ts.osuosl.org
Cc: linux-kernel@...r.kernel.org, Linux PM <linux-pm@...r.kernel.org>,
Netdev <netdev@...r.kernel.org>,
Alexander Duyck <alexander.duyck@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
Sasha Netfin <sasha.neftin@...el.com>,
Aaron Brown <aaron.f.brown@...el.com>,
Stefan Assmann <sassmann@...hat.com>,
David Miller <davem@...emloft.net>, darcari@...hat.com,
Yijun.Shen@...l.com, Perry.Yuan@...l.com,
anthony.wong@...onical.com,
Mario Limonciello <mario.limonciello@...l.com>,
Yijun Shen <yijun.shen@...l.com>
Subject: [PATCH v3 4/7] e1000e: Add Dell's Comet Lake systems into S0ix heuristics
Dell's shipping Comet Lake Latitude and Precision systems containing i219LM are
properly configured and should use the S0ix flows.
Disabling s0ix entry and exit flows caused a regression in power consumption
over suspend to idle on these systems.
Fixes: e086ba2fccda ("e1000e: disable s0ix entry and exit flows for ME systems")
Tested-by: Yijun Shen <yijun.shen@...l.com>
Signed-off-by: Mario Limonciello <mario.limonciello@...l.com>
---
drivers/net/ethernet/intel/e1000e/s0ix.c | 33 +++++++++++++++++++++---
1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/s0ix.c b/drivers/net/ethernet/intel/e1000e/s0ix.c
index c3013edbd9e4..74043e80c32f 100644
--- a/drivers/net/ethernet/intel/e1000e/s0ix.c
+++ b/drivers/net/ethernet/intel/e1000e/s0ix.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 1999 - 2018 Intel Corporation. */
+/* Copyright(c) 1999 - 2018 Intel Corporation.
+ * Copyright(c) 2020 Dell Inc.
+ */
#include <linux/netdevice.h>
@@ -44,6 +46,26 @@ static bool e1000e_check_me(u16 device_id)
return false;
}
+static bool e1000e_check_subsystem_allowlist(struct pci_dev *dev)
+{
+ if (dev->subsystem_vendor == PCI_VENDOR_ID_DELL) {
+ switch (dev->subsystem_device) {
+ case 0x099f: /* Latitude 5310 */
+ case 0x09a0: /* Latitude 5410 */
+ case 0x09c9: /* Latitude 5410 */
+ case 0x09a1: /* Latitude 5510 */
+ case 0x09a2: /* Precision 3550 */
+ case 0x09c0: /* Latitude 5411 */
+ case 0x09c1: /* Latitude 5511 */
+ case 0x09c2: /* Precision 3551 */
+ case 0x09c3: /* Precision 7550 */
+ case 0x09c4: /* Precision 7750 */
+ return true;
+ }
+ }
+ return false;
+}
+
void e1000e_s0ix_entry_flow(struct e1000_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;
@@ -273,8 +295,11 @@ void e1000e_maybe_enable_s0ix(struct e1000_adapter *adapter)
/* require cannon point or later */
if (hw->mac.type < e1000_pch_cnp)
return;
- /* turn off on ME configurations */
- if (e1000e_check_me(pdev->device))
- return;
+ /* check for allowlist of systems */
+ if (!e1000e_check_subsystem_allowlist(pdev)) {
+ /* turn off on ME configurations */
+ if (e1000e_check_me(pdev->device))
+ return;
+ }
adapter->flags2 |= FLAG2_ENABLE_S0IX_FLOWS;
}
--
2.25.1
Powered by blists - more mailing lists