From: Bjorn Helgaas <helgaas@kernel.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux PCI <linux-pci@vger.kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
n0000b.n000b@gmail.com, LKML <linux-kernel@vger.kernel.org>,
Linux ACPI <linux-acpi@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCH v2] PCI / ACPI / PM: Resume bridges w/o drivers on suspend-to-RAM
Date: Fri, 29 Jun 2018 14:19:30 -0500 [thread overview]
Message-ID: <20180629191930.GA40928@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <2518711.SfHWAsyaFM@aspire.rjw.lan>
On Fri, Jun 29, 2018 at 10:34:40AM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> It is reported that commit c62ec4610c40 (PM / core: Fix direct_complete
> handling for devices with no callbacks) introduced a system suspend
> regression on Samsung 305V4A by allowing a PCI bridge (not a PCIe
> port) to stay in D3 over suspend-to-RAM, which is a side effect of
> setting power.direct_complete for the children of that bridge that
> have no PM callbacks.
>
> On the majority of systems PCI bridges are not allowed to be
> runtime-suspended (the power/control sysfs attribute is set to "on"
> for them by default), but user space can change that setting and if
> it does so and a given bridge has no children with PM callbacks, the
> direct_complete optimization will be applied to it and it will stay
> in suspend over system suspend. Apparently, that confuses the
> platform firmware on the affected machine and that may very well
> happen elsewhere, so avoid the direct_complete optimization for
> PCI bridges with no drivers (if there is a driver, it should take
> care of the PM handling) on suspend-to-RAM altogether (that should
> not matter for suspend-to-idle as platform firmware is not involved
> in it).
>
> Fixes: c62ec4610c40 (PM / core: Fix direct_complete handling for devices with no callbacks)
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=199941
> Reported-by: n0000b.n000b@gmail.com
> Tested-by: n0000b.n000b@gmail.com
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> -> v2: Make the patch work for PCI bridges without ACPI companion objects.
>
> Since that doesn't really change the idea etc, but only makes the check
> to be made earlier, I've added the Reviewed-by and Acked-by tags given to
> the previous version. If that's not right, please let me know.
Keeping my ack is fine, and I assume you'll apply this.
It would be nice to see that ACPI spec reference (the spec version and
section number, not necessarily all the text) in the changelog or
maybe even a comment in the code.
> ---
> drivers/pci/pci-acpi.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> Index: linux-pm/drivers/pci/pci-acpi.c
> ===================================================================
> --- linux-pm.orig/drivers/pci/pci-acpi.c
> +++ linux-pm/drivers/pci/pci-acpi.c
> @@ -629,6 +629,15 @@ static bool acpi_pci_need_resume(struct
> {
> struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
>
> + /*
> + * In some cases (eg. Samsung 305V4A) leaving a bridge in suspend
> + * confuses the platform firmware, so avoid doing that, unless the
> + * bridge has a driver that should take care of PM handling.
> + */
> + if (pci_is_bridge(dev) && !dev->driver &&
> + acpi_target_system_state() != ACPI_STATE_S0)
> + return true;
> +
> if (!adev || !acpi_device_power_manageable(adev))
> return false;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-06-29 19:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-26 10:06 [PATCH] " Rafael J. Wysocki
2018-06-26 10:33 ` Mika Westerberg
2018-06-26 14:01 ` Bjorn Helgaas
2018-06-26 14:22 ` Rafael J. Wysocki
2018-06-26 17:14 ` Bjorn Helgaas
2018-06-26 17:19 ` Rafael J. Wysocki
2018-06-26 20:32 ` Bjorn Helgaas
2018-06-27 7:16 ` Rafael J. Wysocki
2018-06-29 8:34 ` [PATCH v2] " Rafael J. Wysocki
2018-06-29 19:19 ` Bjorn Helgaas [this message]
2018-06-30 21:15 ` 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=20180629191930.GA40928@bhelgaas-glaptop.roam.corp.google.com \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=n0000b.n000b@gmail.com \
--cc=rjw@rjwysocki.net \
/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
all inboxes | Powered by JetHome®