e1000e: Use PME poll to circumvent unreliable ACPI wake
authorKai-Heng Feng <kai.heng.feng@canonical.com>
Tue, 15 Aug 2023 17:01:11 +0000 (10:01 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Aug 2023 11:22:22 +0000 (12:22 +0100)
commitd147085183ea1b0efd2c18fca76e4dee873b1e4e
tree71718e9f7f19cc85d1ff26dee5b7006f88d48c87
parentac8a52962164a50e693fa021d3564d7745b83a7f
e1000e: Use PME poll to circumvent unreliable ACPI wake

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@canonical.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Acked-by: Sasha Neftin <sasha.neftin@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/e1000e/netdev.c