From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Matthew Garrett <mjg@redhat.com>
Cc: linux-pm@lists.linux-foundation.org, jbarnes@virtuousgeek.org,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
stern@rowland.harvard.edu, shaohua.li@intel.com,
bjorn.helgaas@hp.com
Subject: Re: [PATCH] pci: Updates to Rafael's runtime PCI PM patch set
Date: Wed, 11 Nov 2009 20:58:20 +0100 [thread overview]
Message-ID: <200911112058.20331.rjw@sisk.pl> (raw)
In-Reply-To: <1257806529-6535-1-git-send-email-mjg@redhat.com>
On Monday 09 November 2009, Matthew Garrett wrote:
> There's a few quirks with Rafael's PCI runtime PM code - this modifies
> them a little. The body of it is just porting it to my GPE rewrite, but
> it also moves the PCI binding earlier (otherwise acpi_pci_bind bails, since
> it's primarily intended for bridges), and also ensures that the pme bit
> gets set properly on hardware that requires it.
Well, I thought more changes would be necessary. :-)
Looking good, a few comments below.
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> ---
> drivers/acpi/pci_bind.c | 12 ++++++------
> drivers/acpi/wakeup.c | 36 ------------------------------------
> drivers/pci/pci-acpi.c | 43 ++++++++++++++++---------------------------
> drivers/pci/pci-driver.c | 6 ++++++
> include/acpi/acpi_bus.h | 6 ------
> 5 files changed, 28 insertions(+), 75 deletions(-)
>
...
> diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
> index eb4f26a..d644db6 100644
> --- a/drivers/pci/pci-driver.c
> +++ b/drivers/pci/pci-driver.c
> @@ -967,6 +967,9 @@ static int pci_pm_runtime_suspend(struct device *dev)
> pci_prepare_to_sleep(pci_dev);
> }
>
> + if (pci_pme_capable(pci_dev, pci_target_state(pci_dev)))
> + pci_pme_active(pci_dev, true);
> +
The PME was supposed to be turned on by pci_prepare_to_sleep().
I guess it wasn't in practice?
> pci_platform_run_wake(pci_dev, true);
>
> return 0;
> @@ -980,6 +983,9 @@ static int pci_pm_runtime_resume(struct device *dev)
> if (!pm || !pm->runtime_resume)
> return -ENOSYS;
>
> + if (pci_pme_capable(pci_dev, pci_target_state(pci_dev)))
> + pci_pme_active(pci_dev, false);
> +
Same here, pci_pm_default_resume_early() should cleare the PME theoretically,
although not for bridges.
> pci_platform_run_wake(pci_dev, false);
> pci_pm_default_resume_early(pci_dev);
> pci_pm_default_resume(pci_dev);
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> index 935036e..9541588 100644
Generally, some parts of it belong to the
"PCI PM: Run-time callbacks for PCI bus type" patch and the others belong
to "PCI / ACPI PM: Platform support for PCI PME wake-up" patch. Should I fold
the changes into them?
Rafael
next prev parent reply other threads:[~2009-11-11 19:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 22:51 [RFC][PATCH 0/4] PCI run-time Power Management Rafael J. Wysocki
2009-10-08 22:52 ` [RFC][PATCH 1/4] PCI PM: Add function for checking PME status of devices Rafael J. Wysocki
2009-10-08 23:32 ` Bjorn Helgaas
2009-10-09 22:11 ` Rafael J. Wysocki
2009-10-08 22:53 ` [RFC][PATCH 2/4] PCI PM: PCIe PME root port service driver (rev. 3) Rafael J. Wysocki
2009-10-08 22:54 ` [RFC][PATCH 3/4] PCI / ACPI PM: Platform support for PCI PME wake-up (rev. 2) Rafael J. Wysocki
2009-10-09 11:23 ` Matthew Garrett
2009-10-09 23:05 ` Rafael J. Wysocki
2009-10-08 22:55 ` [RFC][PATCH 4/4] PCI PM: Run-time callbacks for PCI bus type Rafael J. Wysocki
2009-11-09 22:42 ` [PATCH] pci: Updates to Rafael's runtime PCI PM patch set Matthew Garrett
2009-11-11 19:58 ` Rafael J. Wysocki [this message]
2009-11-11 20:05 ` Matthew Garrett
2009-11-11 20:47 ` 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=200911112058.20331.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=bjorn.helgaas@hp.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mjg@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox