[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080221193350.DA772235007@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
Date: Thu, 21 Feb 2008 11:33:50 -0800
From: David Brownell <david-b@...bell.net>
To: pavel@....cz, jgarzik@...ox.com
Cc: linux-pm@...ts.osdl.org, linux-kernel@...r.kernel.org,
linux-ide@...r.kernel.org
Subject: Re: [linux-pm] power_state: get rid of write-only variable in SATA
> libata uses it under the assumption that "other parts" of the system are
> aware of this variable.
>
> May I assume that the API has changed such that this is no longer necessary?
Yes. The original motivation for dev->power.power_state was to let
the writes to /sys/devices/.../power/state support a PCI-specific
policy for device power state transition. And the motivation for
any driver (or framework) to modify that was that the PM core didn't
update it in all the relevant code paths (it wan't clear how to do
that either), which mean those sysfs files could make trouble.
That file is gone; everything supporting its usage can now go away.
(And the PCI-specific policy -- "only transitions to/from D0 are
allowed" -- can be managed by PCI drivers, and ignored by others
on more flexible hardware.)
The minor problem removing it is that there's some code which has
used fields in power_state for some driver state. But if all that
usage is write-only in the drivers (is that true now for SATA?),
then it's safe to remove the /sys/devices/.../power/state support
from framework code and elsewhere.
- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists