All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Matthew Garrett <mjg@redhat.com>, Len Brown <lenb@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	pm list <linux-pm@lists.linux-foundation.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Linux PCI <linux-pci@vger.kernel.org>,
	Oliver Neukum <oliver@neukum.org>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Shaohua Li <shaohua.li@intel.com>,
	Francois Romieu <romieu@fr.zoreil.com>
Subject: Re: [PATCH 2/12] PCI / PM: Propagate wake-up enable for PCIe devices too
Date: Tue, 5 Jan 2010 22:27:18 +0100	[thread overview]
Message-ID: <201001052227.18130.rjw@sisk.pl> (raw)
In-Reply-To: <20100104154038.76a9eedf@jbarnes-piketon>

On Tuesday 05 January 2010, Jesse Barnes wrote:
> On Sun, 27 Dec 2009 21:00:33 +0100
> "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> 
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> > 
> > Having read the PM part of the PCIe 2.0 specification more carefully
> > I think that it was a mistake to restrict the wake-up enable
> > propagation to non-PCIe devices, because if we do not request
> > control of the root ports' PME registers via OSC, PCIe PME is
> > supposed to be handled by the platform, just like the non-PCIe PME.
> > Even if we do that, the wake-up propagation is done to allow the
> > devices to wake up the system from sleep states which involves the
> > platform anyway, so it won't hurt.
> > 
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> >  drivers/pci/pci-acpi.c |   10 ++--------
> >  1 file changed, 2 insertions(+), 8 deletions(-)
> > 
> > Index: linux-2.6/drivers/pci/pci-acpi.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/pci/pci-acpi.c
> > +++ linux-2.6/drivers/pci/pci-acpi.c
> > @@ -112,11 +112,7 @@ static bool acpi_pci_can_wakeup(struct p
> >  static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus,
> > bool enable) {
> >  	while (bus->parent) {
> > -		struct pci_dev *bridge = bus->self;
> > -		int ret;
> > -
> > -		ret = acpi_pm_device_sleep_wake(&bridge->dev,
> > enable);
> > -		if (!ret || pci_is_pcie(bridge))
> > +		if (!acpi_pm_device_sleep_wake(&bus->self->dev,
> > enable)) return;
> >  		bus = bus->parent;
> >  	}
> > @@ -131,9 +127,7 @@ static int acpi_pci_sleep_wake(struct pc
> >  	if (acpi_pci_can_wakeup(dev))
> >  		return acpi_pm_device_sleep_wake(&dev->dev, enable);
> >  
> > -	if (!pci_is_pcie(dev))
> > -		acpi_pci_propagate_wakeup_enable(dev->bus, enable);
> > -
> > +	acpi_pci_propagate_wakeup_enable(dev->bus, enable);
> >  	return 0;
> >  }
> 
> Seems ok to try it out, but as usual with this sort of thing, the real
> question is, "What does Windows do?", since wakeup enable ACPI support
> for PCIe devices is likely broken unless Windows uses it.

Well, that's in the Linus' tree already, so I guess we're going to learn. ;-)

Seriously, I think that Windows actually uses ACPI wake-up support for PCIe
devices.  On my Toshiba Portege R500 the BIOS doesn't even allow us to use
the native PCIe PME mechanism directly, so the patch is correct IMO.

Rafael

  parent reply	other threads:[~2010-01-05 21:26 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-27 19:57 [PATCH 0/12] PCI run-time PM support (rev. 2) Rafael J. Wysocki
2009-12-27 19:59 ` [PATCH 1/12] PCI PM: Add function for checking PME status of devices Rafael J. Wysocki
2009-12-27 19:59   ` Rafael J. Wysocki
2010-01-06 21:46   ` Jesse Barnes
2010-01-06 21:46   ` Jesse Barnes
2009-12-27 20:00 ` [PATCH 2/12] PCI / PM: Propagate wake-up enable for PCIe devices too Rafael J. Wysocki
2010-01-04 23:40   ` Jesse Barnes
2010-01-05 21:27     ` Rafael J. Wysocki
2010-01-05 21:27     ` Rafael J. Wysocki [this message]
2010-01-04 23:40   ` Jesse Barnes
2009-12-27 20:00 ` Rafael J. Wysocki
2009-12-27 20:01 ` [PATCH 3/12] PCI PM: PCIe PME root port service driver (rev. 5) Rafael J. Wysocki
2009-12-27 20:01 ` Rafael J. Wysocki
2010-01-06 21:53   ` Jesse Barnes
2010-01-06 21:53   ` Jesse Barnes
2009-12-27 20:02 ` [PATCH 4/12] PCI PM: Make it possible to force using INTx for PCIe PME signaling Rafael J. Wysocki
2009-12-27 20:02   ` Rafael J. Wysocki
2010-01-06 21:56   ` Jesse Barnes
2010-01-06 21:56   ` Jesse Barnes
2010-01-06 22:02     ` Matthew Garrett
2010-01-06 23:00       ` Rafael J. Wysocki
2010-01-06 23:00       ` Rafael J. Wysocki
2010-01-08 20:08         ` Len Brown
2010-01-08 20:25           ` Greg KH
2010-01-08 20:25           ` Greg KH
2010-01-08 20:08         ` Len Brown
2010-01-06 22:02     ` Matthew Garrett
2009-12-27 20:03 ` [PATCH 5/12] ACPI: Add infrastructure for refcounting GPE consumers Rafael J. Wysocki
2009-12-27 20:03 ` Rafael J. Wysocki
2009-12-27 20:03 ` [PATCH 6/12] ACPI: Add support for new refcounted GPE API to drivers Rafael J. Wysocki
2009-12-27 20:03   ` Rafael J. Wysocki
2009-12-27 20:04 ` [PATCH 7/12] ACPI: Remove old GPE API and transition code entirely to new one Rafael J. Wysocki
2009-12-27 20:04 ` Rafael J. Wysocki
2009-12-27 20:05 ` [PATCH 8/12] ACPI / PM: Add more run-time wake-up fields Rafael J. Wysocki
2010-01-08 20:39   ` Len Brown
2010-01-08 23:27     ` Rafael J. Wysocki
2010-01-08 23:27     ` Rafael J. Wysocki
2010-01-08 20:39   ` Len Brown
2009-12-27 20:05 ` Rafael J. Wysocki
2009-12-27 20:06 ` [PATCH 9/12] ACPI / PM: Introduce acpi_pm_wakeup_power() Rafael J. Wysocki
2010-01-06 22:00   ` Jesse Barnes
2010-01-06 23:11     ` Rafael J. Wysocki
2010-01-06 23:11     ` Rafael J. Wysocki
2010-01-07 21:11       ` Rafael J. Wysocki
2010-01-07 21:11       ` Rafael J. Wysocki
2010-01-06 22:00   ` Jesse Barnes
2009-12-27 20:06 ` Rafael J. Wysocki
2009-12-27 20:07 ` [PATCH 10/12] PCI / ACPI / PM: Platform support for PCI PME wake-up (rev. 6) Rafael J. Wysocki
2010-01-06 22:04   ` Jesse Barnes
2010-01-07 21:18     ` Rafael J. Wysocki
2010-01-07 21:18     ` Rafael J. Wysocki
2010-01-06 22:04   ` Jesse Barnes
2009-12-27 20:07 ` Rafael J. Wysocki
2009-12-27 20:08 ` [PATCH 11/12] PCI PM: Run-time callbacks for PCI bus type (rev. 2) Rafael J. Wysocki
2009-12-27 20:08 ` Rafael J. Wysocki
2010-01-06 22:06   ` Jesse Barnes
2010-01-06 22:06   ` Jesse Barnes
2009-12-27 20:11 ` [PATCH 12/12] PM / r8169: Add simplified run-time PM support Rafael J. Wysocki
2009-12-27 20:11 ` Rafael J. Wysocki
2010-01-01 19:06   ` [PATCH 12/12] PM / r8169: Add simplified run-time PM support (rev. 2) Rafael J. Wysocki
2010-01-01 19:06   ` Rafael J. Wysocki
2010-01-01  1:29 ` [PATCH][RFC] e1000e: Add basic runtime PM support (was: [PATCH 0/12] PCI run-time PM support (rev. 2)) Rafael J. Wysocki
2010-01-01  1:29 ` Rafael J. Wysocki
2010-01-01  1:29   ` Rafael J. Wysocki
2010-01-01 19:03   ` [PATCH][RFC] e1000e: Add basic runtime PM support (rev. 2) " Rafael J. Wysocki
2010-01-01 21:51     ` [PATCH][RFC] e1000e: Add basic runtime PM support (rev. 3) " Rafael J. Wysocki
2010-01-01 21:51     ` Rafael J. Wysocki
2010-01-01 19:03   ` [PATCH][RFC] e1000e: Add basic runtime PM support (rev. 2) " 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=201001052227.18130.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=bjorn.helgaas@hp.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=mjg@redhat.com \
    --cc=oliver@neukum.org \
    --cc=romieu@fr.zoreil.com \
    --cc=shaohua.li@intel.com \
    --cc=stern@rowland.harvard.edu \
    /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.