From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>, Len Brown <lenb@kernel.org>,
Lukas Wunner <lukas@wunner.de>,
Keith Busch <keith.busch@intel.com>,
Ashok Raj <ashok.raj@intel.com>,
Mario.Limonciello@dell.com,
Anthony Wong <anthony.wong@canonical.com>,
Linus Walleij <linus.walleij@linaro.org>,
Sakari Ailus <sakari.ailus@iki.fi>,
linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v2 01/10] PCI: Do not skip power managed bridges in pci_enable_wake()
Date: Thu, 13 Sep 2018 16:33:39 +0200 [thread overview]
Message-ID: <153688100.j3IOAyprJL@aspire.rjw.lan> (raw)
In-Reply-To: <20180913143322.77953-2-mika.westerberg@linux.intel.com>
On Thursday, September 13, 2018 4:33:13 PM CEST Mika Westerberg wrote:
> Commit baecc470d5fd ("PCI / PM: Skip bridges in pci_enable_wake()")
> changed pci_enable_wake() so that all bridges are skipped when wakeup is
> enabled (or disabled) with the reasoning that bridges can only signal
> wakeup on behalf of their subordinate devices.
>
> However, there are bridges that can signal wakeup itself. For example
> PCIe downstream and root ports supporting hotplug may signal wakeup upon
> hotplug event.
>
> For this reason change pci_enable_wake() so that it skips all bridges
> except those that we power manage (->bridge_d3 is set). Those are the
> ones that can go into low power states and may need to signal wakeup.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> ---
> drivers/pci/pci.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 29ff9619b5fa..1af6f1887986 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -2133,10 +2133,13 @@ static int __pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable
> int ret = 0;
>
> /*
> - * Bridges can only signal wakeup on behalf of subordinate devices,
> - * but that is set up elsewhere, so skip them.
> + * Bridges that are not power-manageable directly only signal
> + * wakeup on behalf of subordinate devices which is set up
> + * elsewhere, so skip them. However, bridges that are
> + * power-manageable may signal wakeup for themselves (for example,
> + * on a hotplug event) and they need to be covered here.
> */
> - if (pci_has_subordinate(dev))
> + if (!pci_power_manageable(dev))
> return 0;
>
> /* Don't do the same thing twice in a row for one device. */
>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
next prev parent reply other threads:[~2018-09-13 14:33 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 14:33 [PATCH v2 00/10] PCI: Allow D3cold for PCIe hierarchies Mika Westerberg
2018-09-13 14:33 ` [PATCH v2 02/10] PCI / ACPI: Enable wake automatically for power managed bridges Mika Westerberg
2018-09-13 14:33 ` [PATCH v2 03/10] PCI: pciehp: Disable hotplug interrupt during suspend Mika Westerberg
2018-09-13 14:33 ` [PATCH v2 04/10] PCI: pciehp: Do not handle events if interrupts are masked Mika Westerberg
2018-09-13 14:33 ` [PATCH v2 05/10] PCI: portdrv: Resume upon exit from system suspend if left runtime suspended Mika Westerberg
2018-09-13 14:35 ` Rafael J. Wysocki
2018-09-13 14:33 ` [PATCH v2 06/10] PCI: portdrv: Add runtime PM hooks for port service drivers Mika Westerberg
2018-09-13 14:33 ` [PATCH v2 07/10] PCI: pciehp: Implement runtime PM callbacks Mika Westerberg
2018-09-13 14:33 ` [PATCH v2 08/10] PCI/PME: " Mika Westerberg
2018-09-13 14:33 ` [PATCH v2 09/10] ACPI / property: Allow multiple property compatible _DSD entries Mika Westerberg
2018-09-13 14:33 ` [PATCH v2 10/10] PCI / ACPI: Whitelist D3 for more PCIe hotplug ports Mika Westerberg
2020-04-07 23:54 ` Bjorn Helgaas
2020-04-08 6:04 ` Mika Westerberg
2020-04-08 20:12 ` Bjorn Helgaas
2020-04-09 6:54 ` Mika Westerberg
2020-04-10 22:30 ` Bjorn Helgaas
2020-04-14 6:27 ` Mika Westerberg
[not found] ` <20180913143322.77953-2-mika.westerberg@linux.intel.com>
2018-09-13 14:33 ` Rafael J. Wysocki [this message]
2018-09-14 8:06 ` [PATCH v2 01/10] PCI: Do not skip power managed bridges in pci_enable_wake() Mika Westerberg
2018-09-14 8:06 ` Mika Westerberg
2018-09-14 8:11 ` Rafael J. Wysocki
2018-09-14 8:11 ` Rafael J. Wysocki
2018-09-14 8:16 ` Mika Westerberg
2018-09-14 8:16 ` Mika Westerberg
2018-09-14 8:31 ` [PATCH RESEND " Mika Westerberg
2018-09-14 8:31 ` Mika Westerberg
2018-09-18 21:38 ` Bjorn Helgaas
2018-09-18 21:38 ` Bjorn Helgaas
2018-09-28 17:45 ` [PATCH v2 00/10] PCI: Allow D3cold for PCIe hierarchies Bjorn Helgaas
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=153688100.j3IOAyprJL@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=Mario.Limonciello@dell.com \
--cc=anthony.wong@canonical.com \
--cc=ashok.raj@intel.com \
--cc=bhelgaas@google.com \
--cc=keith.busch@intel.com \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=sakari.ailus@iki.fi \
/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).