Received: by 10.223.185.116 with SMTP id b49csp4872626wrg; Wed, 7 Mar 2018 02:28:50 -0800 (PST) X-Google-Smtp-Source: AG47ELs3CK0xLsgw77EOanDXLeQYOzu6TAakFMsyl8AXSIEYIuFFkR1Dvptekw84JV8ljmm691f0 X-Received: by 10.99.111.78 with SMTP id k75mr17776464pgc.414.1520418529894; Wed, 07 Mar 2018 02:28:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520418529; cv=none; d=google.com; s=arc-20160816; b=EB5X5DHhhMUb09hvlxZWJjrDDI2rb+1EgDV1e9ogS4euE3LwUSIb8z6+hrQePreZ5C bU6hO8lb7UktmruE71apMMN63kpzznH1Jg2Phm7rTzGZ4h85LSGo+Vmf9ma8WuHK+sX7 bvBGj+CQ6TT1BtF2CccPN45ixpKSvq5IBRtXB0XRMjj+22ARJznRtc+cvSPRSsrgW0QU hwlC7EUqtsU1NKTcnqFPGnGVgYTHiJhhj6n8UQwRlxCDd7g2FgzdjH2H8s2DPxSTGeDk YI+7e27NUzdAaa+K/xWWjyFUwc+wlZkBZnbgAbDqxO8LhxoeHy17D3xRvvL1K/c0V45Z IM+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=GyyVY0PzNs+10dcSdAM91SMEhkVqDHBhCeMhweolweg=; b=VJHpZzETL9MdPixHcFcH1pZUjDR5vusQV+Vemmdzf18/astv0Nui+OYhKxzySpUPSW XkIA+O7KZNpwpkH1joqRQ30E43sFgeZ5BqkwSVmXE+Tc/xdFRcIylR8Ir35tcM4Ehx/5 s/T5PJYe5oec4JiJwJfQRSn0Ur9k5IEvqeYIuDCJm11Pk9FCePICzDvlqom6UQwRz56h jp60Nh8fvlxus9Kyk69E+wynSoGxyeR/G26YXljaXdN31o7bckvjgSKMy1dguPgK0aAW +k+LLJOFeR8cdp28YCe8mP53D+EUYKrq0YAKSO4kFIM/9vZbXkmsuFXHc55WLfur33oT mupA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14si474664pfn.150.2018.03.07.02.28.35; Wed, 07 Mar 2018 02:28:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754314AbeCGK1N (ORCPT + 99 others); Wed, 7 Mar 2018 05:27:13 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:41527 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751151AbeCGK1J (ORCPT ); Wed, 7 Mar 2018 05:27:09 -0500 Received: from 79.184.254.228.ipv4.supernova.orange.pl (79.184.254.228) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 92f7bdb30e66071d; Wed, 7 Mar 2018 11:27:07 +0100 From: "Rafael J. Wysocki" To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Keith Busch , Sinan Kaya , Lukas Wunner Subject: Re: [PATCH v1 3/9] PCI/PM: Clear PCIe PME Status bit for Root Complex Event Collectors Date: Wed, 07 Mar 2018 11:27:51 +0100 Message-ID: <1953703.7ExAQMbr3z@aspire.rjw.lan> In-Reply-To: <152040322027.240786.13965159319024774656.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <152040297576.240786.1532465558381209070.stgit@bhelgaas-glaptop.roam.corp.google.com> <152040322027.240786.13965159319024774656.stgit@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, March 7, 2018 7:13:40 AM CET Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Per PCIe r4.0, sec 6.1.6, Root Complex Event Collectors can generate PME > interrupts on behalf of Root Complex Integrated Endpoints. > > Linux does not currently enable PME interrupts from RC Event Collectors, > but fe31e69740ed ("PCI/PCIe: Clear Root PME Status bits early during system > resume") suggests PME interrupts may be enabled by the platform for ACPI- > based runtime wakeup. > > Clear the PCIe PME Status bit for Root Complex Event Collectors during > resume, just like we already do for Root Ports. > > If the BIOS enables PME interrupts for an event collector and neglects to > clear the status bit on resume, this change should fix the same bug as > fe31e69740ed (PMEs not working after waking from a sleep state), but for > Root Complex Integrated Endpoints. > > Signed-off-by: Bjorn Helgaas > --- > drivers/pci/pci-driver.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c > index bf0704b75f79..38ee7c8b4d1a 100644 > --- a/drivers/pci/pci-driver.c > +++ b/drivers/pci/pci-driver.c > @@ -533,7 +533,8 @@ static void pcie_resume_early(struct pci_dev *pci_dev) > * bits now just in case (shouldn't hurt). > */ > if (pci_is_pcie(pci_dev) && > - pci_pcie_type(pci_dev) == PCI_EXP_TYPE_ROOT_PORT) > + (pci_pcie_type(pci_dev) == PCI_EXP_TYPE_ROOT_PORT || > + pci_pcie_type(pci_dev) == PCI_EXP_TYPE_RC_EC)) > pcie_clear_root_pme_status(pci_dev); > } > > > Reveiwed-by: Rafael J. Wysocki