[J/L/M] [PATCH 1/1] e1000e: Use PME poll to circumvent unreliable ACPI wake
Kai-Heng Feng
kai.heng.feng at canonical.com
Mon Aug 21 03:37:23 UTC 2023
BugLink: https://bugs.launchpad.net/bugs/2028122
On some I219 devices, ethernet cable plugging detection only works once
from PCI D3 state. Subsequent cable plugging does set PME bit correctly,
but device still doesn't get woken up.
Since I219 connects to the root complex directly, it relies on platform
firmware (ACPI) to wake it up. In this case, the GPE from _PRW only
works for first cable plugging but fails to notify the driver for
subsequent plugging events.
The issue was originally found on CNP, but the same issue can be found
on ADL too. So workaround the issue by continuing use PME poll after
first ACPI wake. As PME poll is always used, the runtime suspend
restriction for CNP can also be removed.
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
Tested-by: Naama Meir <naamax.meir at linux.intel.com>
Acked-by: Sasha Neftin <sasha.neftin at intel.com>
Reviewed-by: Simon Horman <simon.horman at corigine.com>
Reviewed-by: Leon Romanovsky <leonro at nvidia.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen at intel.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit d147085183ea1b0efd2c18fca76e4dee873b1e4e linux-next)
Signed-off-by: Kai-Heng Feng <kai.heng.feng at canonical.com>
---
drivers/net/ethernet/intel/e1000e/netdev.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index bd7ef59b1f2e..f0e48f2bc3a2 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -7021,6 +7021,8 @@ static __maybe_unused int e1000e_pm_runtime_resume(struct device *dev)
struct e1000_adapter *adapter = netdev_priv(netdev);
int rc;
+ pdev->pme_poll = true;
+
rc = __e1000_resume(pdev);
if (rc)
return rc;
@@ -7682,7 +7684,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
dev_pm_set_driver_flags(&pdev->dev, DPM_FLAG_SMART_PREPARE);
- if (pci_dev_run_wake(pdev) && hw->mac.type != e1000_pch_cnp)
+ if (pci_dev_run_wake(pdev))
pm_runtime_put_noidle(&pdev->dev);
return 0;
--
2.34.1
More information about the kernel-team
mailing list