From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, Keith Busch <keith.busch@intel.com>,
Sinan Kaya <okaya@codeaurora.org>, Lukas Wunner <lukas@wunner.de>
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 [thread overview]
Message-ID: <1953703.7ExAQMbr3z@aspire.rjw.lan> (raw)
In-Reply-To: <152040322027.240786.13965159319024774656.stgit@bhelgaas-glaptop.roam.corp.google.com>
On Wednesday, March 7, 2018 7:13:40 AM CET Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@google.com>
>
> 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 <bhelgaas@google.com>
> ---
> 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 <rafael.j.wysocki@intel.com>
next prev parent reply other threads:[~2018-03-07 10:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 6:13 [PATCH v1 0/9] PCI: Simplify PCIe port driver Bjorn Helgaas
2018-03-07 6:13 ` [PATCH v1 1/9] PCI/PM: Move pcie_clear_root_pme_status() to core Bjorn Helgaas
2018-03-07 10:24 ` Rafael J. Wysocki
2018-03-07 6:13 ` [PATCH v1 2/9] PCI/PM: Clear PCIe PME Status bit in core, not PCIe port driver Bjorn Helgaas
2018-03-07 10:27 ` Rafael J. Wysocki
2018-03-08 8:03 ` Lukas Wunner
2018-03-08 9:13 ` Rafael J. Wysocki
2018-03-07 6:13 ` [PATCH v1 3/9] PCI/PM: Clear PCIe PME Status bit for Root Complex Event Collectors Bjorn Helgaas
2018-03-07 10:27 ` Rafael J. Wysocki [this message]
2018-03-07 6:13 ` [PATCH v1 4/9] PCI/portdrv: Disable port driver in compat mode Bjorn Helgaas
2018-03-07 10:29 ` Rafael J. Wysocki
2018-03-07 6:13 ` [PATCH v1 5/9] PCI/portdrv: Remove pcie_port_bus_type link order dependency Bjorn Helgaas
2018-03-07 10:33 ` Rafael J. Wysocki
2018-03-07 6:13 ` [PATCH v1 6/9] PCI/portdrv: Remove unused PCIE_PORT_SERVICE_VC Bjorn Helgaas
2018-03-07 10:34 ` Rafael J. Wysocki
2018-03-07 6:14 ` [PATCH v1 7/9] PCI/portdrv: Simplify PCIe feature permission checking Bjorn Helgaas
2018-03-07 11:12 ` Rafael J. Wysocki
2018-03-07 6:14 ` [PATCH v1 8/9] PCI/portdrv: Remove unnecessary include of <linux/pci-aspm.h> Bjorn Helgaas
2018-03-07 11:12 ` Rafael J. Wysocki
2018-03-07 6:14 ` [PATCH v1 9/9] PCI/portdrv: Remove "pcie_hp=nomsi" kernel parameter Bjorn Helgaas
2018-03-07 11:13 ` Rafael J. Wysocki
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=1953703.7ExAQMbr3z@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=helgaas@kernel.org \
--cc=keith.busch@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=okaya@codeaurora.org \
/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