]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ata: ahci: Add debug print for external port
authorNiklas Cassel <cassel@kernel.org>
Wed, 3 Jul 2024 18:44:26 +0000 (20:44 +0200)
committerNiklas Cassel <cassel@kernel.org>
Thu, 4 Jul 2024 09:52:32 +0000 (11:52 +0200)
Add a debug print that tells us if LPM is not getting enabled because the
port is external.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240703184418.723066-20-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/ahci.c

index fc6fd583faf8a79acaae76b9527862f0f0f5eece..a05c1724944812d673be2eb6573eb124b732866b 100644 (file)
@@ -1732,8 +1732,10 @@ static void ahci_update_initial_lpm_policy(struct ata_port *ap)
         * Management Interaction in AHCI 1.3.1. Therefore, do not enable
         * LPM if the port advertises itself as an external port.
         */
-       if (ap->pflags & ATA_PFLAG_EXTERNAL)
+       if (ap->pflags & ATA_PFLAG_EXTERNAL) {
+               ata_port_dbg(ap, "external port, not enabling LPM\n");
                return;
+       }
 
        /* If no LPM states are supported by the HBA, do not bother with LPM */
        if ((ap->host->flags & ATA_HOST_NO_PART) &&