| Message ID | 20250630062637.258329-4-dlemoal@kernel.org |
|---|---|
| State | New |
| Headers | show |
| Series | Improve link power management | expand |
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>
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 --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" : "",
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(-)