linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata: use ATA_ID_CFA_*
@ 2009-04-13 16:50 Sergei Shtylyov
  2009-04-16 19:23 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Sergei Shtylyov @ 2009-04-13 16:50 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide

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

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

---
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(-)

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
@@ -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");


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] libata: use ATA_ID_CFA_*
  2009-04-13 16:50 [PATCH] libata: use ATA_ID_CFA_* Sergei Shtylyov
@ 2009-04-16 19:23 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2009-04-16 19:23 UTC (permalink / raw)
  To: Sergei Shtylyov; +Cc: linux-ide

Sergei Shtylyov wrote:
> Use ATA_ID_CFA_* constants for CFA specific identify data words 162 and 163.
> 
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> 
> ---
> 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-16 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-13 16:50 [PATCH] libata: use ATA_ID_CFA_* Sergei Shtylyov
2009-04-16 19:23 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).