linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: linux-ide@vger.kernel.org, Niklas Cassel <cassel@kernel.org>
Subject: [PATCH v3 10/10] ata: libata_eh: Add debug messages to ata_eh_link_set_lpm()
Date: Tue,  1 Jul 2025 21:53:21 +0900	[thread overview]
Message-ID: <20250701125321.69496-11-dlemoal@kernel.org> (raw)
In-Reply-To: <20250701125321.69496-1-dlemoal@kernel.org>

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>
---
 drivers/ata/libata-eh.c | 2 ++
 1 file changed, 2 insertions(+)

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
-- 
2.50.0


  parent reply	other threads:[~2025-07-01 12:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 12:53 [PATCH v3 00/10] Improve link power management Damien Le Moal
2025-07-01 12:53 ` [PATCH v3 01/10] ata: libata-core: Introduce ata_dev_config_lpm() Damien Le Moal
2025-07-01 14:10   ` Hannes Reinecke
2025-07-01 12:53 ` [PATCH v3 02/10] ata: libata-core: Move device LPM quirk settings to ata_dev_config_lpm() Damien Le Moal
2025-07-01 12:53 ` [PATCH v3 03/10] ata: libata-core: Advertize device support for DIPM and HIPM features Damien Le Moal
2025-07-01 12:53 ` [PATCH v3 04/10] ata: libata-eh: Avoid unnecessary resets when revalidating devices Damien Le Moal
2025-07-01 12:53 ` [PATCH v3 05/10] ata: libata-sata: Disallow changing LPM state if not supported Damien Le Moal
2025-07-01 12:53 ` [PATCH v3 06/10] ata: ahci: Disable DIPM if host lacks support Damien Le Moal
2025-07-01 12:53 ` [PATCH v3 07/10] ata: ahci: Disallow LPM policy control for external ports Damien Le Moal
2025-07-01 12:53 ` [PATCH v3 08/10] ata: ahci: Disallow LPM policy control if not supported Damien Le Moal
2025-07-01 12:53 ` [PATCH v3 09/10] ata: libata-core: Reduce the number of messages signaling broken LPM Damien Le Moal
2025-07-01 12:53 ` Damien Le Moal [this message]
2025-07-02 10:06 ` [PATCH v3 00/10] Improve link power management Niklas Cassel

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=20250701125321.69496-11-dlemoal@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=cassel@kernel.org \
    --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).