On 2/2/24 01:15, Niklas Cassel wrote: > The SATA specification contains a known incompatibility between LPM and > hot-plug events, thus do not enable LPM if the port advertises itself as > being an external SATA port (i.e. either hot-plug capable or eSATA). > > This matches the power policy used in Microsoft Windows, which disables > LPM for external SATA ports, such that hot-plug events can be received. > > Signed-off-by: Niklas Cassel <cassel@xxxxxxxxxx> > --- > drivers/ata/ahci.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c > index 19b605c98d42..d50d1ae44e7f 100644 > --- a/drivers/ata/ahci.c > +++ b/drivers/ata/ahci.c > @@ -1664,6 +1664,14 @@ static void ahci_update_initial_lpm_policy(struct ata_port *ap) > if (!(hpriv->flags & AHCI_HFLAG_USE_LPM_POLICY)) > return; > > + /* > + * The SATA specification contains a known incompatibility between LPM > + * and hot-plug events, thus do not enable LPM if the port advertises > + * itself as an external port (i.e. either hot-plug capable or eSATA). > + */ s/SATA/Serial ATA Revision 3.5a ? s/contains/warns about ? I see section 5.3.10 "Potential external SATA incompatibility issues" but it does not mention LPM. Where is this stated in SATA-IO ? > + if (ap->pflags & ATA_PFLAG_EXTERNAL) > + return; > + > /* user modified policy via module param */ > if (mobile_lpm_policy != -1) { > policy = mobile_lpm_policy; -- Damien Le Moal Western Digital Research