[E/OEM-OSP1-B] [PATCH] UBUNTU: SAUCE: e1000e: Disable s0ix flow for X1 Carbon 7th
Kai-Heng Feng
kai.heng.feng at canonical.com
Mon Mar 23 05:22:24 UTC 2020
BugLink: https://bugs.launchpad.net/bugs/1865570
The s0ix flow makes X1 Carbon 7th can only run S2Idle for only once.
Temporarily disable it until Intel found a solution.
Link: https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20200316/019222.html
BugLink: https://bugs.launchpad.net/bugs/1865570
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
(backported from commit 0a7c179da494e48df1930ff91dc8f0093b32affc git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue)
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 98acfd0b736b..cd692e608805 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -25,6 +25,7 @@
#include <linux/pm_runtime.h>
#include <linux/aer.h>
#include <linux/prefetch.h>
+#include <linux/dmi.h>
#include "e1000.h"
@@ -6807,6 +6808,17 @@ static int __e1000_resume(struct pci_dev *pdev)
}
#ifdef CONFIG_PM_SLEEP
+static const struct dmi_system_id s0ix_blacklist[] = {
+ {
+ .ident = "LENOVO ThinkPad X1 Carbon 7th",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X1 Carbon 7th"),
+ },
+ },
+ {}
+};
+
static int e1000e_pm_thaw(struct device *dev)
{
struct net_device *netdev = pci_get_drvdata(to_pci_dev(dev));
@@ -6844,7 +6856,7 @@ static int e1000e_pm_suspend(struct device *dev)
e1000e_pm_thaw(dev);
/* Introduce S0ix implementation */
- if (hw->mac.type >= e1000_pch_cnp)
+ if (hw->mac.type >= e1000_pch_cnp && !dmi_check_system(s0ix_blacklist))
e1000e_s0ix_entry_flow(adapter);
return rc;
@@ -6859,7 +6871,7 @@ static int e1000e_pm_resume(struct device *dev)
int rc;
/* Introduce S0ix implementation */
- if (hw->mac.type >= e1000_pch_cnp)
+ if (hw->mac.type >= e1000_pch_cnp && !dmi_check_system(s0ix_blacklist))
e1000e_s0ix_exit_flow(adapter);
rc = __e1000_resume(pdev);
--
2.17.1
More information about the kernel-team
mailing list