diff mbox series

[03/10] ata: libata-core: Advertize device support for DIPM and HIPM features

Message ID 20250630062637.258329-4-dlemoal@kernel.org
State New
Headers show
Series Improve link power management | expand

Commit Message

Damien Le Moal June 30, 2025, 6:26 a.m. UTC
Modify ata_dev_print_features() to advertize if a device supports the
Device Initiated Power Management (DIPM) and Host Initiated Power
Management (HIPM) features.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
---
 drivers/ata/libata-core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Niklas Cassel June 30, 2025, 2:47 p.m. UTC | #1
On Mon, Jun 30, 2025 at 03:26:30PM +0900, Damien Le Moal wrote:
> Modify ata_dev_print_features() to advertize if a device supports the
> Device Initiated Power Management (DIPM) and Host Initiated Power
> Management (HIPM) features.
> 
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>

Reviewed-by: Niklas Cassel <cassel@kernel.org>
Hannes Reinecke July 1, 2025, 6:14 a.m. UTC | #2
On 6/30/25 08:26, Damien Le Moal wrote:
> Modify ata_dev_print_features() to advertize if a device supports the
> Device Initiated Power Management (DIPM) and Host Initiated Power
> Management (HIPM) features.
> 
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
>   drivers/ata/libata-core.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index fdce96fd3ffa..d1dff9018a3a 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -2843,11 +2843,13 @@ static void ata_dev_print_features(struct ata_device *dev)
>   		return;
>   
>   	ata_dev_info(dev,
> -		     "Features:%s%s%s%s%s%s%s%s\n",
> +		     "Features:%s%s%s%s%s%s%s%s%s%s\n",
>   		     dev->flags & ATA_DFLAG_FUA ? " FUA" : "",
>   		     dev->flags & ATA_DFLAG_TRUSTED ? " Trust" : "",
>   		     dev->flags & ATA_DFLAG_DA ? " Dev-Attention" : "",
>   		     dev->flags & ATA_DFLAG_DEVSLP ? " Dev-Sleep" : "",
> +		     ata_id_has_hipm(dev->id) ? " HIPM" : "",
> +		     ata_id_has_dipm(dev->id) ? " DIPM" : "",
>   		     dev->flags & ATA_DFLAG_NCQ_SEND_RECV ? " NCQ-sndrcv" : "",
>   		     dev->flags & ATA_DFLAG_NCQ_PRIO ? " NCQ-prio" : "",
>   		     dev->flags & ATA_DFLAG_CDL ? " CDL" : "",

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index fdce96fd3ffa..d1dff9018a3a 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2843,11 +2843,13 @@  static void ata_dev_print_features(struct ata_device *dev)
 		return;
 
 	ata_dev_info(dev,
-		     "Features:%s%s%s%s%s%s%s%s\n",
+		     "Features:%s%s%s%s%s%s%s%s%s%s\n",
 		     dev->flags & ATA_DFLAG_FUA ? " FUA" : "",
 		     dev->flags & ATA_DFLAG_TRUSTED ? " Trust" : "",
 		     dev->flags & ATA_DFLAG_DA ? " Dev-Attention" : "",
 		     dev->flags & ATA_DFLAG_DEVSLP ? " Dev-Sleep" : "",
+		     ata_id_has_hipm(dev->id) ? " HIPM" : "",
+		     ata_id_has_dipm(dev->id) ? " DIPM" : "",
 		     dev->flags & ATA_DFLAG_NCQ_SEND_RECV ? " NCQ-sndrcv" : "",
 		     dev->flags & ATA_DFLAG_NCQ_PRIO ? " NCQ-prio" : "",
 		     dev->flags & ATA_DFLAG_CDL ? " CDL" : "",