From patchwork Wed Jan 5 10:02:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 1575570 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=n+q5q1vr; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JTQ5f64fGz9sXM for ; Wed, 5 Jan 2022 21:02:45 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1n537r-0004AG-JI; Wed, 05 Jan 2022 10:02:35 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1n537q-0004A5-Be for kernel-team@lists.ubuntu.com; Wed, 05 Jan 2022 10:02:34 +0000 Received: from HP-EliteBook-840-G7.. (1-171-96-105.dynamic-ip.hinet.net [1.171.96.105]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 44A3040002 for ; Wed, 5 Jan 2022 10:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1641376954; bh=JSBoFY/fW56sEc1s84ru3OFxf60ZLUDPUp6Kze/kanw=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=n+q5q1vr6PTaoea2XWs8tLFOMGyVdk29qEWgFegfC5HOv7A3giCVDnKDdrtAC5ZzE NFqcH93hpPeqqz8Po8MeWvFN0zSeqcxcy3fJZlmNw1t7v7geZe/6Oe3dXIBh6e6yz+ lXb4yZHLukDwVJhdfqzxUsIKF72w3+HL6jh68oS93S1BIpU+G/xIVKH62SSjqFEEgG mQLZgQ461cyrW6pIhtrcl+L0M83qit4y9kJXwQIw5bAGVMz5c9kXl16GtnoQy/v0eW OQgAL/KLGOFQMzpIr0j0cpmwoffp17GHS6ImoAM2yyQGlB7HdBil0qoHJNFCU4jiAe g6opRn9HfmC5w== From: Kai-Heng Feng To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] net: wwan: iosm: Keep device at D0 for s2idle case Date: Wed, 5 Jan 2022 18:02:28 +0800 Message-Id: <20220105100228.841326-2-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20220105100228.841326-1-kai.heng.feng@canonical.com> References: <20220105100228.841326-1-kai.heng.feng@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1956443 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 Signed-off-by: David S. Miller (cherry picked from commit f4dd5174e2739ab0aeda14b32847e587e78ff3d9 linux-next) Signed-off-by: Kai-Heng Feng --- 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 7f7d364d3a514..66b886e3b59b0 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; }