[SRU] [X/B/C/D/Unstable] [PATCH 0/1] Fix Intel I210 doesn't work when ethernet cable gets plugged

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU] [X/B/C/D/Unstable] [PATCH 0/1] Fix Intel I210 doesn't work when ethernet cable gets plugged

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1806818

[Impact]
Plugging ethernet cable cannot wake up Intel I210 when it's runtime
suspended. It's because the PME is not enabled.

[Fix]
PCI core doesn't enable PME because the driver explicitly saves its PCI
state before runtime suspend routine. Don't save PCI state fixes the
issue.

[Test]
PME is correctly enabled, and cable plugging starts to work.

[Regression Potential]
Minimal. The fix limits to on device, and it's specific to runtime power
management. Other functionalities are not affected.

Kai-Heng Feng (1):
  igb: Fix an issue that PME is not enabled during runtime suspend

 drivers/net/ethernet/intel/igb/igb_main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/1] igb: Fix an issue that PME is not enabled during runtime suspend

Kai-Heng Feng
BugLink: https://bugs.launchpad.net/bugs/1806818

I210 ethernet card doesn't wakeup when a cable gets plugged. It's
because its PME is not set.

Since commit 42eca2302146 ("PCI: Don't touch card regs after runtime
suspend D3"), if the PCI state is saved, pci_pm_runtime_suspend() stops
calling pci_finish_runtime_suspend(), which enables the PCI PME.

To fix the issue, let's not to save PCI states when it's runtime
suspend, to let the PCI subsytem enables PME.

Fixes: 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3")
Signed-off-by: Kai-Heng Feng <[hidden email]>
(cherry picked from commit c881c486761fd093d104fa86e373e504aa60f35e git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue)
Signed-off-by: Kai-Heng Feng <[hidden email]>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 0796cef96fa3..ffaa6e031632 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -8770,9 +8770,11 @@ static int __igb_shutdown(struct pci_dev *pdev, bool *enable_wake,
  rtnl_unlock();
 
 #ifdef CONFIG_PM
- retval = pci_save_state(pdev);
- if (retval)
- return retval;
+ if (!runtime) {
+ retval = pci_save_state(pdev);
+ if (retval)
+ return retval;
+ }
 #endif
 
  status = rd32(E1000_STATUS);
--
2.17.1


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK / APPLIED[D]: [SRU] [X/B/C/D/Unstable] [PATCH 0/1] Fix Intel I210 doesn't work when ethernet cable gets plugged

Seth Forshee
In reply to this post by Kai-Heng Feng
On Wed, Dec 05, 2018 at 02:16:04PM +0800, Kai-Heng Feng wrote:

> BugLink: https://bugs.launchpad.net/bugs/1806818
>
> [Impact]
> Plugging ethernet cable cannot wake up Intel I210 when it's runtime
> suspended. It's because the PME is not enabled.
>
> [Fix]
> PCI core doesn't enable PME because the driver explicitly saves its PCI
> state before runtime suspend routine. Don't save PCI state fixes the
> issue.
>
> [Test]
> PME is correctly enabled, and cable plugging starts to work.
>
> [Regression Potential]
> Minimal. The fix limits to on device, and it's specific to runtime power
> management. Other functionalities are not affected.

Upstream cherry pick, limited impact, positive testing.

Acked-by: Seth Forshee <[hidden email]>

Applied to disco/master-next, thanks!

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team