Skip to contentSkip to conversation

ata: libata: Advertize device support for DIPM and HIPM features for ATAPI

PATCH In review Niklas Cassel 2 participants 3 messages Jan 8 libata

lore
Share & tools
lore

Niklas Cassel

author maintainer
#0 lore raw

PATCH 1/1 ata: libata: Advertize device support for DIPM and HIPM features for ATAPI

Commit b1f5af54f1f5 ("ata: libata-core: Advertize device support for DIPM and HIPM features") added prints if the device supports DIPM and HIPM, however, it forgot to update the same print for ATAPI devices.

Before changes:
ata1.00: ATAPI: Slimtype DVD A DU8AESH, 6C2M, max UDMA/133

After changes:
ata1.00: ATAPI: Slimtype DVD A DU8AESH, 6C2M, max UDMA/133 HIPM DIPM

---
 drivers/ata/libata-core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/ata/libata-core.c +4 -2
index b96105481784..20d539730553 100644
@@ -3143,11 +3143,13 @@ int ata_dev_configure(struct ata_device *dev)
 		/* print device info to dmesg */
 		if (print_info)
 			ata_dev_info(dev,
-				     "ATAPI: %s, %s, max %s%s%s%s\n",
+				     "ATAPI: %s, %s, max %s%s%s%s%s%s\n",
 				     modelbuf, fwrevbuf,
 				     ata_mode_string(xfer_mask),
 				     cdb_intr_string, atapi_an_string,
-				     dma_dir_string);
+				     dma_dir_string,
+				     ata_id_has_hipm(dev->id) ? " HIPM" : "",
+				     ata_id_has_dipm(dev->id) ? " DIPM" : "");
 	}
 
 	/* determine max_sectors */
Signature · 1 line
2.52.0
author maintainer
#1 lore raw
Quoted 11 lines · Niklas Cassel

Commit b1f5af54f1f5 ("ata: libata-core: Advertize device support for DIPM and HIPM features") added prints if the device supports DIPM and HIPM, however, it forgot to update the same print for ATAPI devices.

Before changes:
ata1.00: ATAPI: Slimtype DVD A DU8AESH, 6C2M, max UDMA/133

After changes:
ata1.00: ATAPI: Slimtype DVD A DU8AESH, 6C2M, max UDMA/133 HIPM DIPM

Don't merge this.
I think I have a nicer way.

Kind regards,
Niklas

Quoted 27 lines
---
 drivers/ata/libata-core.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/ata/libata-core.c +4 -2
index b96105481784..20d539730553 100644
@@ -3143,11 +3143,13 @@ int ata_dev_configure(struct ata_device *dev)
 		/* print device info to dmesg */
 		if (print_info)
 			ata_dev_info(dev,
-				     "ATAPI: %s, %s, max %s%s%s%s\n",
+				     "ATAPI: %s, %s, max %s%s%s%s%s%s\n",
 				     modelbuf, fwrevbuf,
 				     ata_mode_string(xfer_mask),
 				     cdb_intr_string, atapi_an_string,
-				     dma_dir_string);
+				     dma_dir_string,
+				     ata_id_has_hipm(dev->id) ? " HIPM" : "",
+				     ata_id_has_dipm(dev->id) ? " DIPM" : "");
 	}
 
 	/* determine max_sectors */
Signature · 1 line
2.52.0
maintainer
#2 lore raw
Quoted 8 lines · Niklas Cassel
Quoted 7 lines · Niklas Cassel

Commit b1f5af54f1f5 ("ata: libata-core: Advertize device support for DIPM and HIPM features") added prints if the device supports DIPM and HIPM, however, it forgot to update the same print for ATAPI devices.

Before changes:
ata1.00: ATAPI: Slimtype DVD A DU8AESH, 6C2M, max UDMA/133

Quoted 7 lines
Quoted 4 lines

After changes:
ata1.00: ATAPI: Slimtype DVD A DU8AESH, 6C2M, max UDMA/133 HIPM DIPM

Don't merge this.
I think I have a nicer way.

Yeah. Adding a different "Features" message like we have for ATA and ZAC devices would be better.

Signature · 2 lines
Damien Le Moal
Western Digital Research