On 5/14/25 19:22, Niklas Cassel wrote:
> The current code performs a SET FEATURES command to disable DIPM if
> policy < ATA_LPM_MED_POWER_WITH_DIPM, this means that it will disable
> DIPM for policies:
> ATA_LPM_UNKNOWN, ATA_LPM_MAX_POWER, ATA_LPM_MED_POWER
> (but not for policy ATA_LPM_MED_POWER_WITH_DIPM).
[...]
> diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
> index 91d97d98eed1..1727248f135d 100644
> --- a/drivers/ata/libata-eh.c
> +++ b/drivers/ata/libata-eh.c
> @@ -3473,7 +3473,7 @@ static int ata_eh_set_lpm(struct ata_link *link, enum ata_lpm_policy policy,
> hints &= ~ATA_LPM_HIPM;
>
> /* disable DIPM before changing link config */
> - if (policy < ATA_LPM_MED_POWER_WITH_DIPM && dev_has_dipm) {
> + if (dev_has_dipm) {
This changes the same line that patch 6 changed... Can you squash these patches
together ?
> err_mask = ata_dev_set_feature(dev,
> SETFEATURES_SATA_DISABLE, SATA_DIPM);
> if (err_mask && err_mask != AC_ERR_DEV) {
--
Damien Le Moal
Western Digital Research