diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 535de3ed60f2..d4d80481b8ec 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1646,6 +1646,14 @@ static void ahci_update_initial_lpm_policy(struct ata_port *ap, if (!(hpriv->flags & AHCI_HFLAG_USE_LPM_POLICY)) return; + /* If no LPM states are supported by the HBA, do not bother with LPM */ + if ((ap->host->flags & ATA_HOST_NO_PART) && + (ap->host->flags & ATA_HOST_NO_SSC) && + (ap->host->flags & ATA_HOST_NO_DEVSLP)) { + ata_port_dbg(ap, "no LPM states supported, not enabling LPM\n"); + return; + } + /* user modified policy via module param */ if (mobile_lpm_policy != -1) { policy = mobile_lpm_policy;