linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@dell.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, Linux PM <linux-pm@vger.kernel.org>,
	Netdev <netdev@vger.kernel.org>,
	Alexander Duyck <alexander.duyck@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Sasha Netfin <sasha.neftin@intel.com>,
	Aaron Brown <aaron.f.brown@intel.com>,
	Stefan Assmann <sassmann@redhat.com>,
	David Miller <davem@davemloft.net>,
	darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com,
	anthony.wong@canonical.com,
	Mario Limonciello <mario.limonciello@dell.com>,
	Yijun Shen <yijun.shen@dell.com>
Subject: [PATCH v3 4/7] e1000e: Add Dell's Comet Lake systems into S0ix heuristics
Date: Fri,  4 Dec 2020 14:09:17 -0600	[thread overview]
Message-ID: <20201204200920.133780-5-mario.limonciello@dell.com> (raw)
In-Reply-To: <20201204200920.133780-1-mario.limonciello@dell.com>

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@dell.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.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


  parent reply	other threads:[~2020-12-04 20:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 20:09 [PATCH v3 0/7] Improve s0ix flows for systems i219LM Mario Limonciello
2020-12-04 20:09 ` [PATCH v3 1/7] e1000e: fix S0ix flow to allow S0i3.2 subset entry Mario Limonciello
2020-12-08 17:24   ` Mario Limonciello
2020-12-08 18:18     ` Jakub Kicinski
2020-12-04 20:09 ` [PATCH v3 2/7] e1000e: Move all S0ix related code into its own source file Mario Limonciello
2020-12-04 21:25   ` Alexander Duyck
2020-12-04 20:09 ` [PATCH v3 3/7] e1000e: Export S0ix flags to ethtool Mario Limonciello
2020-12-04 20:09 ` Mario Limonciello [this message]
2020-12-04 20:09 ` [PATCH v3 5/7] e1000e: Add more Dell CML systems into S0ix heuristics Mario Limonciello
2020-12-04 20:09 ` [PATCH v3 6/7] e1000e: Add Dell TGL desktop " Mario Limonciello
2020-12-04 20:09 ` [PATCH v3 7/7] e1000e: Add another Dell TGL notebook system " Mario Limonciello
2020-12-04 21:27 ` [PATCH v3 0/7] Improve s0ix flows for systems i219LM Alexander Duyck
2020-12-04 22:28   ` Limonciello, Mario
2020-12-04 22:38     ` Alexander Duyck
2020-12-05 23:49       ` Jakub Kicinski
2020-12-06 17:32         ` Alexander Duyck
2020-12-07 13:28 ` Hans de Goede
2020-12-07 15:41   ` Limonciello, Mario
2020-12-08  5:08     ` Neftin, Sasha
2020-12-08  9:30       ` Hans de Goede
2020-12-08 16:14         ` Alexander Duyck
2020-12-08 22:29           ` Limonciello, Mario
2020-12-09 14:44           ` Hans de Goede
2020-12-10  2:24             ` Alexander Duyck
2020-12-10  5:28               ` Neftin, Sasha
2020-12-13  8:33                 ` Neftin, Sasha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201204200920.133780-5-mario.limonciello@dell.com \
    --to=mario.limonciello@dell.com \
    --cc=Perry.Yuan@dell.com \
    --cc=Yijun.Shen@dell.com \
    --cc=aaron.f.brown@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=anthony.wong@canonical.com \
    --cc=darcari@redhat.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sasha.neftin@intel.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).