libata: use ATA_ID_CFA_*
Use ATA_ID_CFA_* constants for CFA specific identify data words 162 and 163. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
20cbf5f8c0
commit
62afe5d744
1 changed files with 4 additions and 3 deletions
|
@ -1656,8 +1656,8 @@ unsigned long ata_id_xfermask(const u16 *id)
|
||||||
/*
|
/*
|
||||||
* Process compact flash extended modes
|
* Process compact flash extended modes
|
||||||
*/
|
*/
|
||||||
int pio = id[163] & 0x7;
|
int pio = (id[ATA_ID_CFA_MODES] >> 0) & 0x7;
|
||||||
int dma = (id[163] >> 3) & 7;
|
int dma = (id[ATA_ID_CFA_MODES] >> 3) & 0x7;
|
||||||
|
|
||||||
if (pio)
|
if (pio)
|
||||||
pio_mask |= (1 << 5);
|
pio_mask |= (1 << 5);
|
||||||
|
@ -2426,7 +2426,8 @@ int ata_dev_configure(struct ata_device *dev)
|
||||||
/* ATA-specific feature tests */
|
/* ATA-specific feature tests */
|
||||||
if (dev->class == ATA_DEV_ATA) {
|
if (dev->class == ATA_DEV_ATA) {
|
||||||
if (ata_id_is_cfa(id)) {
|
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,
|
ata_dev_printk(dev, KERN_WARNING,
|
||||||
"supports DRM functions and may "
|
"supports DRM functions and may "
|
||||||
"not be fully accessable.\n");
|
"not be fully accessable.\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue