From: Damien Le Moal <dlemoal@kernel.org>
To: linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>
Cc: Hannes Reinecke <hare@suse.de>
Subject: [PATCH v2 4/6] ata: libata: Improve LPM policies description
Date: Fri, 27 Jun 2025 16:52:05 +0900 [thread overview]
Message-ID: <20250627075207.23969-5-dlemoal@kernel.org> (raw)
In-Reply-To: <20250627075207.23969-1-dlemoal@kernel.org>
Improve the comment describing enum ata_lpm_policy and add comments
within that enum to describe each of the different possible values.
The enum values comments match the description given for the
CONFIG_SATA_MOBILE_LPM_POLICY config parameter.
No functional changes.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
include/linux/libata.h | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 721f0805b6c9..7462218312ad 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -499,16 +499,28 @@ enum ata_completion_errors {
};
/*
- * Link power management policy: If you alter this, you also need to
- * alter libata-sata.c (for the ascii descriptions)
+ * Link Power Management (LPM) policies.
+ *
+ * The default LPM policy to use for a device link is defined using these values
+ * with the CONFIG_SATA_MOBILE_LPM_POLICY config option and applied through the
+ * target_lpm_policy field of struct ata_port.
+ *
+ * If you alter this, you also need to alter the policy names used with the
+ * sysfs attribute link_power_management_policy defined in libata-sata.c.
*/
enum ata_lpm_policy {
+ /* Keep firmware settings */
ATA_LPM_UNKNOWN,
+ /* No power savings (maximum performance) */
ATA_LPM_MAX_POWER,
+ /* HIPM (Partial) */
ATA_LPM_MED_POWER,
- ATA_LPM_MED_POWER_WITH_DIPM, /* Med power + DIPM as win IRST does */
- ATA_LPM_MIN_POWER_WITH_PARTIAL, /* Min Power + partial and slumber */
- ATA_LPM_MIN_POWER, /* Min power + no partial (slumber only) */
+ /* HIPM (Partial) and DIPM (Partial and Slumber) */
+ ATA_LPM_MED_POWER_WITH_DIPM,
+ /* HIPM (Partial and DevSleep) and DIPM (Partial and Slumber) */
+ ATA_LPM_MIN_POWER_WITH_PARTIAL,
+ /* HIPM (Slumber and DevSleep) and DIPM (Partial and Slumber) */
+ ATA_LPM_MIN_POWER,
};
enum ata_lpm_hints {
--
2.50.0
next prev parent reply other threads:[~2025-06-27 7:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 7:52 [PATCH v2 0/6] Various cleanups Damien Le Moal
2025-06-27 7:52 ` [PATCH v2 1/6] ata: libata: Remove ATA_DFLAG_ZAC device flag Damien Le Moal
2025-06-27 10:53 ` Niklas Cassel
2025-06-27 7:52 ` [PATCH v2 2/6] ata: libata-scsi: Cleanup ata_scsi_offline_dev() Damien Le Moal
2025-06-27 10:53 ` Niklas Cassel
2025-06-27 7:52 ` [PATCH v2 3/6] ata: Fix SATA_MOBILE_LPM_POLICY description in Kconfig Damien Le Moal
2025-06-27 10:54 ` Niklas Cassel
2025-06-27 7:52 ` Damien Le Moal [this message]
2025-06-27 9:08 ` [PATCH v2 4/6] ata: libata: Improve LPM policies description Hannes Reinecke
2025-06-27 10:54 ` Niklas Cassel
2025-06-27 7:52 ` [PATCH v2 5/6] ata: ahci: Clarify mobile_lpm_policy description Damien Le Moal
2025-06-27 10:55 ` Niklas Cassel
2025-06-27 7:52 ` [PATCH v2 6/6] ata: libata-eh: Move and rename ata_eh_set_lpm() Damien Le Moal
2025-06-27 10:55 ` Niklas Cassel
2025-06-30 3:58 ` Damien Le Moal
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=20250627075207.23969-5-dlemoal@kernel.org \
--to=dlemoal@kernel.org \
--cc=cassel@kernel.org \
--cc=hare@suse.de \
--cc=linux-ide@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).