From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "Alan Stern" <stern@rowland.harvard.edu>,
linux-pm@lists.linux-foundation.org,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"Neil Brown" <neilb@suse.de>,
"Matthew Garrett" <mjg59@srcf.ucam.org>,
"mark gross" <640e9920@gmail.com>,
"Arve Hjønnevåg" <arve@android.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Florian Mickler" <florian@mickler.org>,
linux-pci@vger.kernel.org
Subject: Re: [update] Re: [PATCH] PM: Make it possible to avoid wakeup events from being lost
Date: Mon, 28 Jun 2010 12:11:20 -0700 [thread overview]
Message-ID: <20100628121120.4f764413@virtuousgeek.org> (raw)
In-Reply-To: <201006282101.54041.rjw@sisk.pl>
On Mon, 28 Jun 2010 21:01:53 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> --- linux-2.6.orig/drivers/pci/pci.c
> +++ linux-2.6/drivers/pci/pci.c
> @@ -1275,6 +1275,22 @@ bool pci_check_pme_status(struct pci_dev
> return ret;
> }
>
> +/*
> + * Time to wait before the system can be put into a sleep state after reporting
> + * a wakeup event signaled by a PCI device.
> + */
> +#define PCI_WAKEUP_COOLDOWN 100
> +
> +/**
> + * pci_wakeup_event - Report a wakeup event related to a given PCI device.
> + * @dev: Device to report the wakeup event for.
> + */
> +void pci_wakeup_event(struct pci_dev *dev)
> +{
> + if (device_may_wakeup(&dev->dev))
> + pm_wakeup_event(&dev->dev, PCI_WAKEUP_COOLDOWN);
> +}
> +
> /**
> * pci_pme_wakeup - Wake up a PCI device if its PME Status bit is set.
> * @dev: Device to handle.
> @@ -1285,8 +1301,10 @@ bool pci_check_pme_status(struct pci_dev
> */
> static int pci_pme_wakeup(struct pci_dev *dev, void *ign)
> {
> - if (pci_check_pme_status(dev))
> + if (pci_check_pme_status(dev)) {
> pm_request_resume(&dev->dev);
> + pci_wakeup_event(dev);
> + }
> return 0;
> }
>
I assume the units here are ms? And the wakeup event propagation check
is pushed down into pci_wakeup_event, is there no place to check
whether the device is configured to generate wakeups in the core device
or PM code?
Other than that, the PCI part is
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2010-06-28 19:13 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-26 13:14 [PATCH] PM: Make it possible to avoid wakeup events from being lost Rafael J. Wysocki
2010-06-27 15:50 ` Alan Stern
2010-06-27 23:59 ` Rafael J. Wysocki
2010-06-28 14:16 ` Alan Stern
2010-06-28 19:01 ` [update] " Rafael J. Wysocki
2010-06-28 19:11 ` Jesse Barnes [this message]
2010-06-28 19:19 ` Alan Stern
2010-06-28 21:19 ` Rafael J. Wysocki
2010-06-28 20:38 ` Greg KH
2010-06-30 7:10 ` Florian Mickler
2010-06-30 13:47 ` mark gross
2010-06-30 18:00 ` Alan Stern
2010-06-30 19:27 ` Rafael J. Wysocki
2010-06-30 19:58 ` Alan Stern
2010-06-30 23:52 ` Rafael J. Wysocki
2010-07-01 13:58 ` Alan Stern
2010-07-01 20:08 ` Rafael J. Wysocki
2010-07-01 20:44 ` Alan Stern
2010-07-01 21:05 ` Rafael J. Wysocki
2010-06-28 23:28 ` [linux-pm] " David Brownell
2010-06-29 19:57 ` Alan Stern
2010-06-27 22:28 ` mark gross
2010-06-28 12:50 ` Rafael J. Wysocki
2010-06-29 4:43 ` mark gross
2010-07-01 13:32 ` Pavel Machek
2010-07-01 15:08 ` Florian Mickler
2010-07-01 19:02 ` Rafael J. Wysocki
2010-07-02 18:14 ` Pavel Machek
2010-07-02 19:21 ` 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=20100628121120.4f764413@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=640e9920@gmail.com \
--cc=arve@android.com \
--cc=dmitry.torokhov@gmail.com \
--cc=florian@mickler.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mjg59@srcf.ucam.org \
--cc=neilb@suse.de \
--cc=rjw@sisk.pl \
--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