Skip to contentSkip to conversation

libata: use ATA_ID_CFA_*

PATCH Applied Sergei Shtylyov 2 participants 2 messages Apr 13, 2009 – Apr 16, 2009 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libata: use ATA_ID_CFA_*

Use ATA_ID_CFA_* constants for CFA specific identify data words 162 and 163.

---
Resending now (when it's too late already :-)...
This patch is against the recent Linus' tree.

 drivers/ata/libata-core.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/ata/libata-core.c +4 -3
Index: linux-2.6/drivers/ata/libata-core.c
===================================================================
@@ -1653,8 +1653,8 @@ unsigned long ata_id_xfermask(const u16 
 		/*
 		 *	Process compact flash extended modes
 		 */
-		int pio = id[163] & 0x7;
-		int dma = (id[163] >> 3) & 7;
+		int pio = (id[ATA_ID_CFA_MODES] >> 0) & 0x7;
+		int dma = (id[ATA_ID_CFA_MODES] >> 3) & 0x7;
 
 		if (pio)
 			pio_mask |= (1 << 5);
@@ -2412,7 +2412,8 @@ int ata_dev_configure(struct ata_device 
 	/* ATA-specific feature tests */
 	if (dev->class == ATA_DEV_ATA) {
 		if (ata_id_is_cfa(id)) {
-			if (id[162] & 1) /* CPRM may make this media unusable */
+			/* CPRM may make this media unusable */
+			if (id[ATA_ID_CFA_KEY_MGMT] & 1)
 				ata_dev_printk(dev, KERN_WARNING,
 					       "supports DRM functions and may "
 					       "not be fully accessable.\n");
Applied
#1 lore raw
Quoted 10 lines · Sergei Shtylyov

Use ATA_ID_CFA_* constants for CFA specific identify data words 162 and 163.

---
Resending now (when it's too late already :-)...
This patch is against the recent Linus' tree.

 drivers/ata/libata-core.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

applied