Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Mikko Juhani Korhonen <mjkorhon@gmail.com>
Cc: Damien Le Moal <dlemoal@kernel.org>,
	Ioannis Barkas <jnyb.de@gmail.com>,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH v4] ata: libata: disable LPM for WDC WD20EFAX-68FB5N0 hard drives
Date: Wed, 14 May 2025 19:57:37 +0200	[thread overview]
Message-ID: <aCTZkV5mRjDsYyeE@ryzen> (raw)
In-Reply-To: <CAAZ0mTeiVqZQvkWzJ8aFH4FUPCZwy5O+9hPBgDPhSgNNz+t6HA@mail.gmail.com>

Hello Mikko,

On Mon, May 12, 2025 at 05:16:14PM +0300, Mikko Juhani Korhonen wrote:
> >
> Yes, but for some reason now I get different results. I wonder what's
> different now. The earlier results were on configuration
> sata ports 5,6 -> WDC WD20EFAX-68FB5N0
> so LPM had to be disabled (it's impossible to run anything) but can't
> remember what kernel version and which variation I used to disable it.
> 
> Now with vanilla 6.14.5 and configuration:
> sata ports 5,6 -> WDC WD5000AAKX-001CA0
> sata ports 3,4 -> WDC WD20EFAX-68FB5N0
> I get:

Well we still see:

> /dev/sda:
> 
> ATA device, with non-removable media
>     Model Number:       WDC WD20EFAX-68FB5N0
>     Firmware Revision:  82.00A82
> Commands/features:
>     Enabled    Supported:
>        *    Host-initiated interface power management
>        *    Device-initiated interface power management

This drive supports both HIPM and DIPM,
and has both enabled. (Which makes sense since lpm-pol 3 includes DIPM.)


> /dev/sdb:
> 
> ATA device, with non-removable media
>     Model Number:       WDC WD20EFAX-68FB5N0
>     Firmware Revision:  82.00A82
> Commands/features:
>     Enabled    Supported:
>        *    Host-initiated interface power management
>             Device-initiated interface power management

This drive supports HIPM and DIPM,
but only HIPM has been enabled. (Which does not make sense since
lpm-pol 3 includes DIPM...)

I have no idea what is going on here...

I would add some debug prints around:
https://github.com/torvalds/linux/blob/v6.15-rc6/drivers/ata/libata-eh.c#L3512-L3520

To
1) Make sure that we actually send down the SET FEATURES command for
to the drive.

2) Check the return code (err_mask). This code looks a bit sketchy,
if (err_mask && err_mask != AC_ERR_DEV) {

It seems that if err_mask == AC_ERR_DEV, the error would get silently
discarded...


Did you do something with this drive?
Was this perhaps the drive that got timeout? and for some reason
the timeouts caused DIPM to get disabled?

Did you get any timeouts on the other drive of the same model (/dev/sda) ?


> /dev/sdc:
> 
> ATA device, with non-removable media
>     Model Number:       WDC WD5000AAKX-001CA0
>     Firmware Revision:  15.01H15
> Commands/features:
>     Enabled    Supported:
>        *    Host-initiated interface power management

This drive appears to only support HIPM, it does not support DIPM.
It has HIPM enabled, because that is the only feature supported by
the drive.



Looking at what you told before:

WD5000AAKX-001CA0 works with LPM enabled (lpm-pol 3), on port 5-6.
WD20EFAX-68FB5N0 gets timeouts with LPM enabled (lpm-pol 3), on port 5-6.

Would again suggest that your controller has issues with DIPM.
The reason why you don't need the "no lpm" quirk on the
"WDC WD5000AAKX-001CA0" drive is most likely because it doesn't support DIPM.

Remind me again, without any quirks, do you get timeouts for the
"WDC WD20EFAX-68FB5N0" drive on all drives, or just on port 5-6?


I would really like to know why DIPM is not enabled on your device,
even though it claims support for it, and you are using lpm-pol 3.


Kind regards,
Niklas

  parent reply	other threads:[~2025-05-14 17:57 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30 20:36 [PATCH v4] ata: libata: disable LPM for WDC WD20EFAX-68FB5N0 hard drives Ioannis Barkas
2025-05-01 18:47 ` Damien Le Moal
2025-05-02  1:32   ` Damien Le Moal
2025-05-05  7:58     ` Mikko Juhani Korhonen
2025-05-05 15:37       ` Niklas Cassel
2025-05-05 17:09         ` Mikko Juhani Korhonen
2025-05-07  8:55           ` Damien Le Moal
2025-05-10 10:14             ` Mikko Juhani Korhonen
2025-05-10 11:59               ` Niklas Cassel
2025-05-10 18:29                 ` Ioannis Barkas
2025-05-11 17:08                 ` Mikko Juhani Korhonen
2025-05-11 18:53                   ` Niklas Cassel
2025-05-11 18:59                     ` Mikko Juhani Korhonen
2025-05-11 19:18                       ` Niklas Cassel
2025-05-11 20:40                         ` Mikko Juhani Korhonen
2025-05-12  5:37                         ` Mikko Juhani Korhonen
2025-05-12  9:25                           ` Niklas Cassel
2025-05-12 10:34                             ` Mikko Juhani Korhonen
2025-05-12 11:20                               ` Niklas Cassel
     [not found]                                 ` <CAAZ0mTeiVqZQvkWzJ8aFH4FUPCZwy5O+9hPBgDPhSgNNz+t6HA@mail.gmail.com>
2025-05-14 17:57                                   ` Niklas Cassel [this message]
2025-05-17 16:31                                     ` Mikko Juhani Korhonen
     [not found]                                     ` <CAAZ0mTdZEd6n+tDvqbqzMQS2W+3efpYOeHupYcj3rDSVeuHFBA@mail.gmail.com>
2025-05-23 14:05                                       ` Niklas Cassel
2025-06-02 11:17                                     ` Mikko Juhani Korhonen
2025-06-05 12:18                                       ` Niklas Cassel
2025-06-09 13:49                                         ` Niklas Cassel
2025-06-11 13:14                                           ` Mikko Juhani Korhonen
2025-06-11 13:33                                             ` Niklas Cassel
2025-05-07  8:59           ` Niklas Cassel
2025-05-08 19:24             ` Mario Limonciello
2025-05-07  8:59           ` Damien Le Moal
2025-05-11 18:55             ` Mikko Juhani Korhonen
  -- strict thread matches above, loose matches on Subject: below --
2025-05-05 19:38 Ioannis Barkas
2025-05-05 23:33 ` Damien Le Moal
2025-05-06 11:29 ` Mikko Juhani Korhonen
2025-04-29 16:44 Mikko Korhonen
2025-04-30  6:35 ` Niklas Cassel

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=aCTZkV5mRjDsYyeE@ryzen \
    --to=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=jnyb.de@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=mjkorhon@gmail.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