linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ide/libata: fix ata_id_is_cfa()
@ 2009-01-23 13:15 Sergei Shtylyov
  2009-01-23 13:33 ` Alan Cox
  2009-01-24 23:06 ` Sergei Shtylyov
  0 siblings, 2 replies; 50+ messages in thread
From: Sergei Shtylyov @ 2009-01-23 13:15 UTC (permalink / raw)
  To: bzolnier, jgarzik; +Cc: linux-ide, alan, gdu

When checking for CFA feature set support, ata_id_is_cfa() tests bit 2 in word
82 of the identify data instead the word 83.  It also checks the ATA revision
in the  word 80 instead of usual validity check for the words 82-83 -- word 83
bit 14 set, bit 15 cleared.

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

---
I'm not sure who should queue this patch... it's against Linus' tree.

 include/linux/ata.h |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6/include/linux/ata.h
===================================================================
--- linux-2.6.orig/include/linux/ata.h
+++ linux-2.6/include/linux/ata.h
@@ -734,9 +734,8 @@ static inline int ata_id_is_cfa(const u1
 	if (id[ATA_ID_CONFIG] == 0x848A)	/* Standard CF */
 		return 1;
 	/* Could be CF hiding as standard ATA */
-	if (ata_id_major_version(id) >= 3 &&
-	    id[ATA_ID_COMMAND_SET_1] != 0xFFFF &&
-	   (id[ATA_ID_COMMAND_SET_1] & (1 << 2)))
+	if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) == 0x4000 &&
+	    (id[ATA_ID_COMMAND_SET_2] & (1 << 2)))
 		return 1;
 	return 0;
 }


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

end of thread, other threads:[~2009-01-27 11:29 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23 13:15 [PATCH] ide/libata: fix ata_id_is_cfa() Sergei Shtylyov
2009-01-23 13:33 ` Alan Cox
2009-01-23 13:53   ` Sergei Shtylyov
2009-01-23 15:43     ` Alan Cox
2009-01-23 16:30       ` Sergei Shtylyov
2009-01-23 16:41         ` Alan Cox
2009-01-23 17:01           ` Sergei Shtylyov
2009-01-23 17:12             ` Mark Lord
2009-01-23 17:18               ` Sergei Shtylyov
2009-01-23 17:27   ` Sergei Shtylyov
2009-01-23 17:53     ` Alan Cox
2009-01-23 19:13       ` Sergei Shtylyov
2009-01-24 23:06 ` Sergei Shtylyov
2009-01-25 10:50   ` Alan Cox
2009-01-26 11:49     ` Sergei Shtylyov
2009-01-26 12:01       ` Alan Cox
2009-01-26 18:11         ` Sergei Shtylyov
2009-01-26 19:01           ` Alan Cox
2009-01-26 19:25             ` Sergei Shtylyov
2009-01-25 10:52   ` Alan Cox
2009-01-25 19:04   ` Bartlomiej Zolnierkiewicz
2009-01-26 19:32     ` Sergei Shtylyov
2009-01-26 18:47   ` Sergei Shtylyov
2009-01-26 19:08     ` Alan Cox
2009-01-26 19:28       ` Sergei Shtylyov
2009-01-26 19:33         ` Sergei Shtylyov
2009-01-26 19:41           ` Alan Cox
2009-01-26 19:42           ` Alan Cox
2009-01-26 19:56             ` Sergei Shtylyov
2009-01-26 20:01               ` Alan Cox
2009-01-26 20:31                 ` Sergei Shtylyov
2009-01-26 20:59                   ` Sergei Shtylyov
2009-01-26 21:22                     ` Alan Cox
2009-01-26 21:38                       ` Sergei Shtylyov
2009-01-26 21:43                         ` Sergei Shtylyov
2009-01-26 23:28                           ` Sergei Shtylyov
2009-01-26 20:47                 ` Sergei Shtylyov
2009-01-26 19:39         ` Alan Cox
2009-01-26 19:31       ` Sergei Shtylyov
2009-01-26 19:35         ` Alan Cox
2009-01-26 19:45           ` Sergei Shtylyov
2009-01-26 19:54             ` Alan Cox
2009-01-26 20:03               ` Sergei Shtylyov
2009-01-26 20:12                 ` Jeff Garzik
2009-01-26 20:23                   ` Sergei Shtylyov
2009-01-26 20:33                     ` Alan Cox
2009-01-26 20:41                       ` Sergei Shtylyov
2009-01-26 23:53                       ` Sergei Shtylyov
2009-01-26 20:16                 ` Sergei Shtylyov
2009-01-27 11:29       ` Sergei Shtylyov

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