Re: power_state: get rid of write-only variable in SATA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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


_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux