diff options
| author | Niklas Cassel <cassel@kernel.org> | 2026-01-12 13:20:48 +0100 |
|---|---|---|
| committer | Damien Le Moal <dlemoal@kernel.org> | 2026-01-13 22:00:02 +0900 |
| commit | ce83767ea323baf8509a75eb0c783cd203e14789 (patch) | |
| tree | 6423c40bb5d4bf1c51132079efb6b3943adae9ff /tools/include/generated/asm/git@git.tavy.me:linux.git | |
| parent | 8f3fb33f8f3f825c708ece800c921977c157f9b6 (diff) | |
ata: libata-sata: Improve link_power_management_supported sysfs attribute
The link_power_management_supported sysfs attribute is currently set as
true even for ata ports that lack a .set_lpm() callback, e.g. dummy ports.
This is a bit silly, because while writing to the
link_power_management_policy sysfs attribute will make ata_scsi_lpm_store()
update ap->target_lpm_policy (thus sysfs will reflect the new value) and
call ata_port_schedule_eh() for the port, it is essentially a no-op.
This is because for a port without a .set_lpm() callback, once EH gets to
run, the ata_eh_link_set_lpm() will simply return, since the port does not
provide a .set_lpm() callback.
Thus, make sure that the link_power_management_supported sysfs attribute
is set to false for ports that lack a .set_lpm() callback. This way the
link_power_management_policy sysfs attribute will no longer be writable,
so we will no longer be misleading users to think that their sysfs write
actually does something.
Fixes: 0060beec0bfa ("ata: libata-sata: Add link_power_management_supported sysfs attribute")
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Tested-by: Wolf <wolf@yoxt.cc>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'tools/include/generated/asm/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
