public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <dlemoal@kernel.org>
To: Niklas Cassel <cassel@kernel.org>
Cc: Werner Fischer <devlists@wefi.net>,
	Daniel Drake <drake@endlessos.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Jian-Hong Pan <jhp@endlessos.org>,
	Dieter Mummenschanz <dmummenschanz@web.de>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH 4/5] ata: ahci: do not enable LPM on external ports
Date: Fri, 2 Feb 2024 11:09:12 +0900	[thread overview]
Message-ID: <6f3135f0-73c7-4ddf-b4c6-916eab32c237@kernel.org> (raw)
In-Reply-To: <20240201161507.1147521-5-cassel@kernel.org>

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@kernel.org>
> ---
>  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


  reply	other threads:[~2024-02-02  2:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 16:14 [PATCH 0/5] drop low power policy board type Niklas Cassel
2024-02-01 16:14 ` [PATCH 1/5] ata: ahci: move marking of external port earlier Niklas Cassel
2024-02-02  1:52   ` Damien Le Moal
2024-02-01 16:14 ` [PATCH 2/5] ata: ahci: a hotplug capable port is an external port Niklas Cassel
2024-02-02  1:54   ` Damien Le Moal
2024-02-01 16:15 ` [PATCH 3/5] ata: ahci: drop hpriv param from ahci_update_initial_lpm_policy() Niklas Cassel
2024-02-02  1:57   ` Damien Le Moal
2024-02-01 16:15 ` [PATCH 4/5] ata: ahci: do not enable LPM on external ports Niklas Cassel
2024-02-02  2:09   ` Damien Le Moal [this message]
2024-02-01 16:15 ` [PATCH 5/5] ata: ahci: Drop low power policy board type Niklas Cassel
2024-02-02  2:12   ` Damien Le Moal
2024-02-02  2:13 ` [PATCH 0/5] drop " Damien Le Moal
2024-02-02 13:13 ` Werner Fischer
2024-02-02 15:12   ` Mario Limonciello

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=6f3135f0-73c7-4ddf-b4c6-916eab32c237@kernel.org \
    --to=dlemoal@kernel.org \
    --cc=cassel@kernel.org \
    --cc=devlists@wefi.net \
    --cc=dmummenschanz@web.de \
    --cc=drake@endlessos.org \
    --cc=jhp@endlessos.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /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