diff options
| author | Damien Le Moal <dlemoal@kernel.org> | 2025-07-01 21:53:21 +0900 |
|---|---|---|
| committer | Niklas Cassel <cassel@kernel.org> | 2025-07-02 12:01:34 +0200 |
| commit | cb35d3b62274ec4a0b9f9d18ef46fcc902784a92 (patch) | |
| tree | d63a7d9e3dcdc057b394d3971a7ba4f9accc51da | |
| parent | 3b50dd4c064d71f8f50a266b46d93537eeba782e (diff) | |
ata: libata_eh: Add debug messages to ata_eh_link_set_lpm()
To facilitate field debugging of link power management related issues,
add a debug message to ata_eh_link_set_lpm() to easily track LPM policy
changes done from EH context, that is, during device scan and
revalidation, error handling, and when a policy change is issued through
a host sysfs link_power_management_policy attribute.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20250701125321.69496-11-dlemoal@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
| -rw-r--r-- | drivers/ata/libata-eh.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 7f5d13f9ca73..0f9c30f9bc1e 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c @@ -2140,6 +2140,8 @@ static int ata_eh_link_set_lpm(struct ata_link *link, if (WARN_ON_ONCE(policy == ATA_LPM_UNKNOWN)) return 0; + ata_link_dbg(link, "Set LPM policy: %d -> %d\n", old_policy, policy); + /* * DIPM is enabled only for ATA_LPM_MIN_POWER, * ATA_LPM_MIN_POWER_WITH_PARTIAL, and ATA_LPM_MED_POWER_WITH_DIPM, as |