From patchwork Mon Mar 29 05:23:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kai-Heng Feng X-Patchwork-Id: 12169501 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 816B4C433C1 for ; Mon, 29 Mar 2021 05:24:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C37E6195B for ; Mon, 29 Mar 2021 05:24:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229515AbhC2FYE (ORCPT ); Mon, 29 Mar 2021 01:24:04 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:51421 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbhC2FXt (ORCPT ); Mon, 29 Mar 2021 01:23:49 -0400 Received: from 1-171-92-165.dynamic-ip.hinet.net ([1.171.92.165] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lQkNP-0006bx-Rl; Mon, 29 Mar 2021 05:23:48 +0000 From: Kai-Heng Feng To: bhelgaas@google.com Cc: Kai-Heng Feng , linux-pci@vger.kernel.org (open list:PCI SUBSYSTEM), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v2] PCI: Disable D3cold support on Intel XMM7360 Date: Mon, 29 Mar 2021 13:23:39 +0800 Message-Id: <20210329052339.20882-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On some platforms, the root port for Intel XMM7360 WWAN supports D3cold. When the root port is put to D3cold by system suspend or runtime suspend, attempt to systems resume or runtime resume will freeze the laptop for a while, then it automatically shuts down. The root cause is unclear for now, as the Intel XMM7360 doesn't have a driver yet. So disable D3cold for XMM7360 as a workaround, until proper device driver is in place. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212419 Signed-off-by: Kai-Heng Feng --- v2: - Add comment. drivers/pci/quirks.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 653660e3ba9e..c48b0b4a4164 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -5612,3 +5612,16 @@ static void apex_pci_fixup_class(struct pci_dev *pdev) } DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a, PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class); + +/* + * Device [8086:7360] + * When it resumes from D3cold, system freeze and shutdown happens. + * Currently there's no driver for XMM7360, so add it as a PCI quirk. + * https://bugzilla.kernel.org/show_bug.cgi?id=212419 + */ +static void pci_fixup_no_d3cold(struct pci_dev *pdev) +{ + pci_info(pdev, "disable D3cold\n"); + pci_d3cold_disable(pdev); +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x7360, pci_fixup_no_d3cold);