netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kai-Heng Feng <kai.heng.feng@canonical.com>
To: m.chetan.kumar@intel.com, linuxwwan@intel.com
Cc: linux-pci@vger.kernel.org, linux-pm@vger.kernel.org,
	Kai-Heng Feng <kai.heng.feng@canonical.com>,
	Loic Poulain <loic.poulain@linaro.org>,
	Sergey Ryazanov <ryazanov.s.a@gmail.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] net: wwan: iosm: Keep device at D0 for s2idle case
Date: Fri, 24 Dec 2021 16:19:14 +0800	[thread overview]
Message-ID: <20211224081914.345292-2-kai.heng.feng@canonical.com> (raw)
In-Reply-To: <20211224081914.345292-1-kai.heng.feng@canonical.com>

We are seeing spurious wakeup caused by Intel 7560 WWAN on AMD laptops.
This prevent those laptops to stay in s2idle state.

From what I can understand, the intention of ipc_pcie_suspend() is to
put the device to D3cold, and ipc_pcie_suspend_s2idle() is to keep the
device at D0. However, the device can still be put to D3hot/D3cold by
PCI core.

So explicitly let PCI core know this device should stay at D0, to solve
the spurious wakeup.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/net/wwan/iosm/iosm_ipc_pcie.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wwan/iosm/iosm_ipc_pcie.c b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
index d73894e2a84ed..af1d0e837fe99 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_pcie.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_pcie.c
@@ -340,6 +340,9 @@ static int __maybe_unused ipc_pcie_suspend_s2idle(struct iosm_pcie *ipc_pcie)
 
 	ipc_imem_pm_s2idle_sleep(ipc_pcie->imem, true);
 
+	/* Let PCI core know this device should stay at D0 */
+	pci_save_state(ipc_pcie->pci);
+
 	return 0;
 }
 
-- 
2.33.1


  reply	other threads:[~2021-12-24  8:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24  8:19 [PATCH 1/2] net: wwan: iosm: Let PCI core handle PCI power transition Kai-Heng Feng
2021-12-24  8:19 ` Kai-Heng Feng [this message]
2021-12-29 20:18   ` [PATCH 2/2] net: wwan: iosm: Keep device at D0 for s2idle case Bjorn Helgaas
2021-12-30  1:00     ` Kai-Heng Feng
2022-01-03 15:28       ` Kumar, M Chetan
2022-01-03 17:21         ` Jakub Kicinski
2022-01-04  2:23         ` Kai-Heng Feng
2021-12-27 12:30 ` [PATCH 1/2] net: wwan: iosm: Let PCI core handle PCI power transition patchwork-bot+netdevbpf
2021-12-29 20:12 ` Bjorn Helgaas
2021-12-30  0:57   ` Kai-Heng Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211224081914.345292-2-kai.heng.feng@canonical.com \
    --to=kai.heng.feng@canonical.com \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxwwan@intel.com \
    --cc=loic.poulain@linaro.org \
    --cc=m.chetan.kumar@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=ryazanov.s.a@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).