Skip to content

Commit 439d476

Browse files
floatiousdamien-lemoal
authored andcommitted
ata: libata: Print if port is external on boot
Commit affccb1 ("ata: ahci: print the lpm policy on boot") added a lpm-pol print during boot, which shows the LPM policy used by each port. While the LPM policy is usually determined by the Kconfig CONFIG_SATA_MOBILE_LPM_POLICY, the Kconfig value is overridden e.g. if firmware has marked the port as hotplug capable / external. Commit f97106b ("ata: ahci: Add debug print for external port") did add a debug print to show if LPM was disabled because firmware has marked the port as external, however, because devices having broken LPM (even though they claim to support it) is more common than one would have hoped, print "ext" during boot if firmware has marked the port is external. This will make it easier to debug certain LPM issues, e.g. if firmware has enabled/marked only some of the ports as hotplug capable / external. Before (port marked as external by firmware): ata1: SATA max UDMA/133 abar m4096@0xfebd3000 port 0xfebd3100 irq 57 lpm-pol 0 After (port marked as external by firmware): ata1: SATA max UDMA/133 abar m4096@0xfebd3000 port 0xfebd3100 irq 57 lpm-pol 0 ext Signed-off-by: Niklas Cassel <cassel@kernel.org> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
1 parent b8ed947 commit 439d476

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/libata.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,6 +1618,8 @@ static inline void ata_port_desc_misc(struct ata_port *ap, int irq)
16181618
{
16191619
ata_port_desc(ap, "irq %d", irq);
16201620
ata_port_desc(ap, "lpm-pol %d", ap->target_lpm_policy);
1621+
if (ap->pflags & ATA_PFLAG_EXTERNAL)
1622+
ata_port_desc(ap, "ext");
16211623
}
16221624

16231625
static inline bool ata_tag_internal(unsigned int tag)

0 commit comments

Comments
 (0)