linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Huang Ying <ying.huang@intel.com>,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-pm@vger.kernel.org,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: PCI/PM: Add comments for PME poll support for PCIe
Date: Mon, 5 Nov 2012 15:14:46 -0700	[thread overview]
Message-ID: <CAErSpo4z+P+NxA_LOb5rKyO34yOx=_vu+=qAWMvnpDjJsAYL-g@mail.gmail.com> (raw)
In-Reply-To: <3515628.KRd0S4T47k@vostro.rjw.lan>

On Fri, Oct 26, 2012 at 5:18 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Friday, October 26, 2012 01:07:51 PM Huang Ying wrote:
>> There are comments on why PME poll support is necessary for PCI
>> devices, but not for PCIe devices.  That may lead to misunderstanding
>> that PME poll is only necessary for PCI devices.  So add comments
>> related to PCIe PME poll to make it more clear.
>>
>> The content of comments comes from the changelog of commit:
>>
>> 379021d5c0899fcf9410cae4ca7a59a5a94ca769
>>
>> Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> Signed-off-by: Huang Ying <ying.huang@intel.com>
>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

I applied this to my pci/misc branch as v3.8 material.  Thanks!

>> ---
>>  drivers/pci/pci.c |   28 +++++++++++++++++++---------
>>  1 file changed, 19 insertions(+), 9 deletions(-)
>>
>> --- a/drivers/pci/pci.c
>> +++ b/drivers/pci/pci.c
>> @@ -1578,15 +1578,25 @@ void pci_pme_active(struct pci_dev *dev,
>>
>>       pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pmcsr);
>>
>> -     /* PCI (as opposed to PCIe) PME requires that the device have
>> -        its PME# line hooked up correctly. Not all hardware vendors
>> -        do this, so the PME never gets delivered and the device
>> -        remains asleep. The easiest way around this is to
>> -        periodically walk the list of suspended devices and check
>> -        whether any have their PME flag set. The assumption is that
>> -        we'll wake up often enough anyway that this won't be a huge
>> -        hit, and the power savings from the devices will still be a
>> -        win. */
>> +     /*
>> +      * PCI (as opposed to PCIe) PME requires that the device have
>> +      * its PME# line hooked up correctly. Not all hardware vendors
>> +      * do this, so the PME never gets delivered and the device
>> +      * remains asleep. The easiest way around this is to
>> +      * periodically walk the list of suspended devices and check
>> +      * whether any have their PME flag set. The assumption is that
>> +      * we'll wake up often enough anyway that this won't be a huge
>> +      * hit, and the power savings from the devices will still be a
>> +      * win.
>> +      *
>> +      * Although PCIe uses in-band PME message instead of PME# line
>> +      * to report PME, PME does not work for some PCIe devices in
>> +      * reality.  For example, there are devices that set their PME
>> +      * status bits, but don't really bother to send a PME message;
>> +      * there are PCI Express Root Ports that don't bother to
>> +      * trigger interrupts when they receive PME messages from the
>> +      * devices below.  So PME poll is used for PCIe devices too.
>> +      */
>>
>>       if (dev->pme_poll) {
>>               struct pci_pme_device *pme_dev;
>>
> --
> I speak only for myself.
> Rafael J. Wysocki, Intel Open Source Technology Center.

      reply	other threads:[~2012-11-05 22:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-26  5:07 PCI/PM: Add comments for PME poll support for PCIe Huang Ying
2012-10-26 11:18 ` Rafael J. Wysocki
2012-11-05 22:14   ` Bjorn Helgaas [this message]

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='CAErSpo4z+P+NxA_LOb5rKyO34yOx=_vu+=qAWMvnpDjJsAYL-g@mail.gmail.com' \
    --to=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@sisk.pl \
    --cc=ying.huang@intel.com \
    /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).