All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Linux PCI <linux-pci@vger.kernel.org>,
	n0000b.n000b@gmail.com, Bjorn Helgaas <bhelgaas@google.com>,
	Mika Westerberg <mika.westerberg@linux.intel.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] PCI / ACPI / PM: Resume bridges w/o drivers on suspend-to-RAM
Date: Tue, 26 Jun 2018 12:14:06 -0500	[thread overview]
Message-ID: <20180626171406.GC146680@bhelgaas-glaptop.roam.corp.google.com> (raw)
In-Reply-To: <CAJZ5v0jc5oJzEX6QVDVjsQLmLxXHg3PSyepbh50dLXOtnHPgrA@mail.gmail.com>

On Tue, Jun 26, 2018 at 04:22:00PM +0200, Rafael J. Wysocki wrote:
> On Tue, Jun 26, 2018 at 4:01 PM, Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Tue, Jun 26, 2018 at 12:06:01PM +0200, Rafael J. Wysocki wrote:
> >> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> >> +     /*
> >> +      * 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)
> >> +             return true;
> >
> > It sounds like the question of whether leaving a bridge in D3 confuses
> > the firmware has a platform-specific answer.
> 
> Well, it may confuse the platform firmware in general.
> 
> > How does the driver PM handling know how to do the right thing?
> 
> For endpoints this is not an issue as they always have been expected
> to be in D3 before passing control to the platform firmware on S3
> entry, but we've never done that for bridges by default, except for
> PCIe ports with PM enabled (in which case the driver decides whether
> or not to enable it).

If there's any spec reference for the expected power states of devices
when entering S3, that would be useful here.  I can't tell if there's
any guidance for this or if it's just figured out experimentally.

> > Does it need to know whether
> > it's safe to put the device in D3?  Or maybe a device is never put in
> > D3 for system suspend if it has a driver?
> 
> As per the above, endpoints should be OK (or they are quirky if not),
> but bridges are sort of a gray area.  PCIe ports for which we enable
> PM should be fine, for the rest it's better to be conservative and
> resume them IMO.

  reply	other threads:[~2018-06-26 17:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-26 10:06 [PATCH] PCI / ACPI / PM: Resume bridges w/o drivers on suspend-to-RAM 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 [this message]
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
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=20180626171406.GC146680@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=rafael@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.