From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: "Zheng, Qi" <qi.zheng@intel.com>,
Bjorn Helgaas <bhelgaas@google.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"Zha, Qipeng" <qipeng.zha@intel.com>,
Dave Airlie <airlied@gmail.com>,
"Nyman, Mathias" <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: [PATCH v2 2/4] PCI: Move PCIe ports to D3 during suspend
Date: Mon, 11 Apr 2016 15:38:07 +0200 [thread overview]
Message-ID: <CAJZ5v0he594EgJqoT4MMvhsKBSRLk7d4jFBVAfR+hGHs4oRfsA@mail.gmail.com> (raw)
In-Reply-To: <20160411085605.GB1727@lahna.fi.intel.com>
On Mon, Apr 11, 2016 at 10:56 AM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:
> On Mon, Apr 11, 2016 at 03:36:41AM +0000, Zheng, Qi wrote:
>> > +static int pci_dev_check_d3cold(struct pci_dev *pdev, void *data) {
>> > + bool *d3cold_ok = data;
>> > +
>> > + /*
>> > + * The device needs to be allowed to go D3cold and if it is wake
>> > + * capable to do so from D3cold.
>> > + */
>> > + if (pdev->no_d3cold || !pdev->d3cold_allowed)
>> > + *d3cold_ok = false;
>> > + if (device_may_wakeup(&pdev->dev) && !pci_pme_capable(pdev, PCI_D3cold))
>> > + *d3cold_ok = false;
>> > +
>> > + return !*d3cold_ok;
>> >+}
>>
>> How about the pme_poll?
>> IMHO, if the pme_poll is set for some device, the PCIe port couldn't
>> go to sleep as well.
>
> I wasn't sure about that. If the device has pme_poll set, and the bridge
> is in D3 (or anything else than D0) the it will not be scanned for PME
> (this is done in pci_pme_list_scan()).
>
> My understanding is that pme_poll is a workaround for bridges which do not
> forward PME messages upstream properly. Since this whole thing is only
> enabled for recent PCIe hardware, I would expect that this works also :)
Fair enough, but we may need to do something about that in the future
if things turn out to not work properly.
next prev parent reply other threads:[~2016-04-11 13:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-08 10:36 [PATCH v2 0/4] PCI: Add support for suspending (including runtime) of PCIe ports Mika Westerberg
2016-04-08 10:36 ` [PATCH v2 1/4] PCI: No need to set d3cold_allowed to " Mika Westerberg
2016-04-08 10:36 ` [PATCH v2 2/4] PCI: Move PCIe ports to D3 during suspend Mika Westerberg
2016-04-08 15:07 ` Greg Kroah-Hartman
2016-04-11 8:47 ` Mika Westerberg
2016-04-11 3:36 ` Zheng, Qi
2016-04-11 8:56 ` Mika Westerberg
2016-04-11 13:38 ` Rafael J. Wysocki [this message]
2016-04-12 6:51 ` Mika Westerberg
2016-04-12 17:45 ` Lukas Wunner
2016-04-13 8:34 ` Mika Westerberg
2016-04-08 10:36 ` [PATCH v2 3/4] ACPI / hotplug / PCI: Runtime resume bridge before rescan Mika Westerberg
2016-04-08 10:36 ` [PATCH v2 4/4] PCI: Add runtime PM support for PCIe ports Mika Westerberg
2016-04-12 17:52 ` Lukas Wunner
2016-04-13 8:33 ` Mika Westerberg
2016-04-13 9:08 ` Andreas Noever
2016-04-13 9:16 ` Mika Westerberg
2016-04-18 14:38 ` Lukas Wunner
2016-04-19 12:31 ` Mika Westerberg
2016-04-20 19:22 ` Lukas Wunner
2016-04-20 20:23 ` Rafael J. Wysocki
2016-04-21 13:12 ` Mika Westerberg
2016-04-21 19:19 ` Rafael J. Wysocki
2016-04-21 23:25 ` Andreas Noever
2016-04-22 0:26 ` Rafael J. Wysocki
2016-04-22 9:10 ` Mika Westerberg
2016-04-22 12:37 ` Rafael J. Wysocki
2016-04-21 13:10 ` Mika Westerberg
2016-04-24 16:13 ` Lukas Wunner
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=CAJZ5v0he594EgJqoT4MMvhsKBSRLk7d4jFBVAfR+hGHs4oRfsA@mail.gmail.com \
--to=rafael@kernel.org \
--cc=airlied@gmail.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mathias.nyman@intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=qi.zheng@intel.com \
--cc=qipeng.zha@intel.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;
as well as URLs for NNTP newsgroup(s).