From: Jesse Barnes <jesse.barnes@intel.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Linux PCI <linux-pci@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>, Andreas Mohr <andi@lisas.de>,
pm list <linux-pm@lists.linux-foundation.org>,
granade <kevin.granade@gmail.com>,
kevin@smtp1.linux-foundation.org,
Arjan van de Ven <arjan@infradead.org>
Subject: Re: [Resend][PATCH] PCI PM: Read device power state from register after updating it
Date: Tue, 6 Oct 2009 09:08:55 -0700 [thread overview]
Message-ID: <20091006090855.650ef454@jbarnes-g45> (raw)
In-Reply-To: <200910050048.40699.rjw@sisk.pl>
On Mon, 5 Oct 2009 00:48:40 +0200
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> After attempting to change the power state of a PCI device
> pci_raw_set_power_state() doesn't check if the value it wrote into
> the device's PCI_PM_CTRL register has been stored in there, but
> unconditionally modifies the device's current_state field to reflect
> the change. This may cause problems to happen if the power state of
> the device hasn't been changed in fact, because it will make the PCI
> PM core make a wrong assumption.
>
> To prevent such situations from happening modify
> pci_raw_set_power_state() so that it reads the device's PCI_PM_CTRL
> register after writing into it and uses the value read from the
> register to update the device's current_state field. Also make it
> print a message saying that the device refused to change its power
> state as requested (returning an error code in such cases would cause
> suspend regressions to appear on some systems, where device drivers'
> suspend routines return error codes if pci_set_power_state() fails).
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Applied to my for-linus branch, thanks.
--
Jesse Barnes, Intel Open Source Technology Center
prev parent reply other threads:[~2009-10-06 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-04 22:48 [Resend][PATCH] PCI PM: Read device power state from register after updating it Rafael J. Wysocki
2009-10-06 16:08 ` Jesse Barnes [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=20091006090855.650ef454@jbarnes-g45 \
--to=jesse.barnes@intel.com \
--cc=andi@lisas.de \
--cc=arjan@infradead.org \
--cc=kevin.granade@gmail.com \
--cc=kevin@smtp1.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
/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