mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: [PATCH 4.20 237/352] igb: Fix an issue that PME is not enabled during runtime suspend
       [not found] <CAFU=Bqd8ZVNqT5OY0ou05h0N2Oue3=-2exBf-43r0A_rEFpbvQ@mail.gmail.com>
@ 2019-02-16 18:03 ` niveditas98
  2019-02-18 15:34   ` niveditas98
  0 siblings, 1 reply; 3+ messages in thread
From: niveditas98 @ 2019-02-16 18:03 UTC (permalink / raw)
  To: linux-kernel, Kai-Heng Feng, intel-wired-lan, linux-pm

Bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=202571

The igb commit is commit fb29f76cc5668d8fc9e2b04ebfaf4de4f62e1866


On Tue, Feb 12, 2019 at 7:21 PM Arvind Sankar <nivedita@alum.mit.edu> wrote:
>
> After upgrading to 4.20.8, I got a WARN in my dmesg and I suspect this
> change. Reverting it removes this warning.
>
> I am not subscribed to the list, please Cc me if any follup questions.
>
> [   12.457238] ------------[ cut here ]------------
> [   12.457251] PCI PM: State of device not saved by igb_runtime_suspend+0x0/0x80
> [   12.457275] WARNING: CPU: 1 PID: 175 at
> drivers/pci/pci-driver.c:1280 pci_pm_runtime_suspend+0x127/0x130
> [   12.457277] Modules linked in: 8021q zfs(PO) zunicode(PO) zlua(PO)
> zcommon(PO) znvpair(PO) zavl(PO) icp(PO) spl(O) zlib_inflate
> x86_pkg_temp_thermal kvm_intel kvm coretemp hwmon irqbypass
> crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64
> crypto_simd cryptd glue_helper intel_cstate intel_uncore
> intel_rapl_perf intel_pch_thermal i2c_i801 ipmi_si ipmi_devintf
> ipmi_msghandler
> [   12.457318] CPU: 1 PID: 175 Comm: kworker/1:1 Tainted: P
> O    T 4.20.8 #16
> [   12.457320] Hardware name: Supermicro Super Server/X10SDV-7TP8F,
> BIOS 2.0 06/13/2018
> [   12.457329] Workqueue: pm pm_runtime_work
> [   12.457337] RIP: 0010:pci_pm_runtime_suspend+0x127/0x130
> [   12.457340] Code: f7 0f 00 8b 44 24 04 eb a1 44 39 e8 74 9a 80 3d
> cb 7b d0 00 00 75 91 48 c7 c7 d8 b3 75 a2 c6 05 bb 7b d0 00 01 e8 fe
> 37 cf ff <0f> 0b 31 c0 e9 77 ff ff ff 41 55 41 54 45 31 e4 55 53 48 89
> fb 48
> [   12.457343] RSP: 0018:ffffb300406abd88 EFLAGS: 00010282
> [   12.457347] RAX: 0000000000000000 RBX: ffff965fc6ff20b0 RCX: ffffffffa2829cb8
> [   12.457350] RDX: 0000000000000001 RSI: 0000000000000082 RDI: ffffffffa3755d88
> [   12.457353] RBP: ffffffffa24a7980 R08: 0000000000000001 R09: 0000000000000442
> [   12.457355] R10: 0000000000000003 R11: 0000000000000000 R12: ffff965fc6ff2000
> [   12.457358] R13: 0000000000000000 R14: ffffffffa1b62550 R15: 0000000000000000
> [   12.457361] FS:  0000000000000000(0000) GS:ffff96671f440000(0000)
> knlGS:0000000000000000
> [   12.457365] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [   12.457368] CR2: 00007fff7670c11c CR3: 00000002c7c0a004 CR4: 00000000003606e0
> [   12.457370] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> [   12.457373] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> [   12.457374] Call Trace:
> [   12.457387]  ? __switch_to_asm+0x34/0x70
> [   12.457395]  __rpm_callback+0x70/0x1b0
> [   12.457401]  ? __switch_to_asm+0x34/0x70
> [   12.457406]  ? pci_dev_put+0x20/0x20
> [   12.457412]  rpm_callback+0x66/0x90
> [   12.457418]  ? pci_dev_put+0x20/0x20
> [   12.457424]  rpm_suspend+0x15a/0x570
> [   12.457431]  pm_runtime_work+0x8c/0xa0
> [   12.457439]  process_one_work+0x1d2/0x350
> [   12.457446]  worker_thread+0x28/0x3d0
> [   12.457453]  ? wq_calc_node_cpumask.constprop.50+0x20/0x20
> [   12.457457]  kthread+0x103/0x120
> [   12.457462]  ? kthread_create_on_node+0x90/0x90
> [   12.457468]  ret_from_fork+0x35/0x40
> [   12.457472] ---[ end trace aa262aac85ec967a ]---

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4.20 237/352] igb: Fix an issue that PME is not enabled during runtime suspend
  2019-02-16 18:03 ` [PATCH 4.20 237/352] igb: Fix an issue that PME is not enabled during runtime suspend niveditas98
@ 2019-02-18 15:34   ` niveditas98
  0 siblings, 0 replies; 3+ messages in thread
From: niveditas98 @ 2019-02-18 15:34 UTC (permalink / raw)
  To: niveditas98; +Cc: linux-kernel, Kai-Heng Feng, intel-wired-lan, linux-pm

Looking at the warning, is it getting triggered because
pci_set_power_state is now going to be called twice, once in
igb_runtime_suspend and then again in pci_finish_runtime_suspend?

On Sat, Feb 16, 2019 at 01:03:32PM -0500, niveditas98@gmail.com wrote:
> Bugzilla https://bugzilla.kernel.org/show_bug.cgi?id=202571
> 
> The igb commit is commit fb29f76cc5668d8fc9e2b04ebfaf4de4f62e1866
> 
> 
> On Tue, Feb 12, 2019 at 7:21 PM Arvind Sankar <nivedita@alum.mit.edu> wrote:
> >
> > After upgrading to 4.20.8, I got a WARN in my dmesg and I suspect this
> > change. Reverting it removes this warning.
> >
> > I am not subscribed to the list, please Cc me if any follup questions.
> >
> > [   12.457238] ------------[ cut here ]------------
> > [   12.457251] PCI PM: State of device not saved by igb_runtime_suspend+0x0/0x80
> > [   12.457275] WARNING: CPU: 1 PID: 175 at
> > drivers/pci/pci-driver.c:1280 pci_pm_runtime_suspend+0x127/0x130
> > [   12.457277] Modules linked in: 8021q zfs(PO) zunicode(PO) zlua(PO)
> > zcommon(PO) znvpair(PO) zavl(PO) icp(PO) spl(O) zlib_inflate
> > x86_pkg_temp_thermal kvm_intel kvm coretemp hwmon irqbypass
> > crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64
> > crypto_simd cryptd glue_helper intel_cstate intel_uncore
> > intel_rapl_perf intel_pch_thermal i2c_i801 ipmi_si ipmi_devintf
> > ipmi_msghandler
> > [   12.457318] CPU: 1 PID: 175 Comm: kworker/1:1 Tainted: P
> > O    T 4.20.8 #16
> > [   12.457320] Hardware name: Supermicro Super Server/X10SDV-7TP8F,
> > BIOS 2.0 06/13/2018
> > [   12.457329] Workqueue: pm pm_runtime_work
> > [   12.457337] RIP: 0010:pci_pm_runtime_suspend+0x127/0x130
> > [   12.457340] Code: f7 0f 00 8b 44 24 04 eb a1 44 39 e8 74 9a 80 3d
> > cb 7b d0 00 00 75 91 48 c7 c7 d8 b3 75 a2 c6 05 bb 7b d0 00 01 e8 fe
> > 37 cf ff <0f> 0b 31 c0 e9 77 ff ff ff 41 55 41 54 45 31 e4 55 53 48 89
> > fb 48
> > [   12.457343] RSP: 0018:ffffb300406abd88 EFLAGS: 00010282
> > [   12.457347] RAX: 0000000000000000 RBX: ffff965fc6ff20b0 RCX: ffffffffa2829cb8
> > [   12.457350] RDX: 0000000000000001 RSI: 0000000000000082 RDI: ffffffffa3755d88
> > [   12.457353] RBP: ffffffffa24a7980 R08: 0000000000000001 R09: 0000000000000442
> > [   12.457355] R10: 0000000000000003 R11: 0000000000000000 R12: ffff965fc6ff2000
> > [   12.457358] R13: 0000000000000000 R14: ffffffffa1b62550 R15: 0000000000000000
> > [   12.457361] FS:  0000000000000000(0000) GS:ffff96671f440000(0000)
> > knlGS:0000000000000000
> > [   12.457365] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> > [   12.457368] CR2: 00007fff7670c11c CR3: 00000002c7c0a004 CR4: 00000000003606e0
> > [   12.457370] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> > [   12.457373] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> > [   12.457374] Call Trace:
> > [   12.457387]  ? __switch_to_asm+0x34/0x70
> > [   12.457395]  __rpm_callback+0x70/0x1b0
> > [   12.457401]  ? __switch_to_asm+0x34/0x70
> > [   12.457406]  ? pci_dev_put+0x20/0x20
> > [   12.457412]  rpm_callback+0x66/0x90
> > [   12.457418]  ? pci_dev_put+0x20/0x20
> > [   12.457424]  rpm_suspend+0x15a/0x570
> > [   12.457431]  pm_runtime_work+0x8c/0xa0
> > [   12.457439]  process_one_work+0x1d2/0x350
> > [   12.457446]  worker_thread+0x28/0x3d0
> > [   12.457453]  ? wq_calc_node_cpumask.constprop.50+0x20/0x20
> > [   12.457457]  kthread+0x103/0x120
> > [   12.457462]  ? kthread_create_on_node+0x90/0x90
> > [   12.457468]  ret_from_fork+0x35/0x40
> > [   12.457472] ---[ end trace aa262aac85ec967a ]---

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 4.20 237/352] igb: Fix an issue that PME is not enabled during runtime suspend
  2019-02-11 14:13 [PATCH 4.20 000/352] 4.20.8-stable review Greg Kroah-Hartman
@ 2019-02-11 14:17 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2019-02-11 14:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kai-Heng Feng, Aaron Brown,
	Jeff Kirsher, Sasha Levin

4.20-stable review patch.  If anyone has any objections, please let me know.

------------------

[ Upstream commit 1fb3a7a75e2efcc83ef21f2434069cddd6fae6f5 ]

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 subsystem enables PME.

Fixes: 42eca2302146 ("PCI: Don't touch card regs after runtime suspend D3")
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 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 5df88ad8ac81..93f150784cfc 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.19.1




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-18 15:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAFU=Bqd8ZVNqT5OY0ou05h0N2Oue3=-2exBf-43r0A_rEFpbvQ@mail.gmail.com>
2019-02-16 18:03 ` [PATCH 4.20 237/352] igb: Fix an issue that PME is not enabled during runtime suspend niveditas98
2019-02-18 15:34   ` niveditas98
2019-02-11 14:13 [PATCH 4.20 000/352] 4.20.8-stable review Greg Kroah-Hartman
2019-02-11 14:17 ` [PATCH 4.20 237/352] igb: Fix an issue that PME is not enabled during runtime suspend Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®