Declare and use constants for CFA specific identify data words 162 and 163. Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx> --- This patch is against the current pata-2.6 series. I'd prefer that Bart merged it thru his tree as my next patch adding CF mode support to IDE depends on it. drivers/ata/libata-core.c | 7 ++++--- include/linux/ata.h | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) Index: linux-2.6/drivers/ata/libata-core.c =================================================================== --- linux-2.6.orig/drivers/ata/libata-core.c +++ linux-2.6/drivers/ata/libata-core.c @@ -1650,8 +1650,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); @@ -2408,7 +2408,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"); Index: linux-2.6/include/linux/ata.h =================================================================== --- linux-2.6.orig/include/linux/ata.h +++ linux-2.6/include/linux/ata.h @@ -89,6 +89,8 @@ enum { ATA_ID_DLF = 128, ATA_ID_CSFO = 129, ATA_ID_CFA_POWER = 160, + ATA_ID_CFA_KEY_MGMT = 162, + ATA_ID_CFA_MODES = 163, ATA_ID_ROT_SPEED = 217, ATA_ID_PIO4 = (1 << 1), -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html