All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ata: Detect Delkin Devices compact flash
@ 2010-02-23 18:41 Ben Gardner
  2010-03-01 20:12 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Gardner @ 2010-02-23 18:41 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide, Alan Cox

I have a Delkin Devices compact flash card that isn't being recognized using the
SATA/PATA drivers.
The card is recognized and works with the deprecated ATA drivers.

The error I am seeing is:
ata1.00: failed to IDENTIFY (device reports invalid type, err_mask=0x0)

I tracked it down to ata_id_is_cfa() in include/linux/ata.h.
The Delkin card has id[0] set to 0x844a and id[83] set to 0.
This isn't what the kernel expects and is probably incorrect.

The simplest work-around is to add a check for 0x844a to ata_id_is_cfa().

Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
---
--- linux-2.6.33-rc8.orig/include/linux/ata.h
+++ linux-2.6.33-rc8/include/linux/ata.h
@@ -841,7 +841,8 @@

 static inline int ata_id_is_cfa(const u16 *id)
 {
-	if (id[ATA_ID_CONFIG] == 0x848A)	/* Traditional CF */
+	if ((id[ATA_ID_CONFIG] == 0x848A) ||	/* Traditional CF */
+	    (id[ATA_ID_CONFIG] == 0x844A))	/* Delkin Devices CF */
 		return 1;
 	/*
 	 * CF specs don't require specific value in the word 0 anymore and yet

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

* Re: [PATCH] ata: Detect Delkin Devices compact flash
  2010-02-23 18:41 [PATCH] ata: Detect Delkin Devices compact flash Ben Gardner
@ 2010-03-01 20:12 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2010-03-01 20:12 UTC (permalink / raw)
  To: Ben Gardner; +Cc: linux-ide, Alan Cox

On 02/23/2010 01:41 PM, Ben Gardner wrote:
> I have a Delkin Devices compact flash card that isn't being recognized using the
> SATA/PATA drivers.
> The card is recognized and works with the deprecated ATA drivers.
>
> The error I am seeing is:
> ata1.00: failed to IDENTIFY (device reports invalid type, err_mask=0x0)
>
> I tracked it down to ata_id_is_cfa() in include/linux/ata.h.
> The Delkin card has id[0] set to 0x844a and id[83] set to 0.
> This isn't what the kernel expects and is probably incorrect.
>
> The simplest work-around is to add a check for 0x844a to ata_id_is_cfa().
>
> Signed-off-by: Ben Gardner<gardner.ben@gmail.com>

applied



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

end of thread, other threads:[~2010-03-01 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-23 18:41 [PATCH] ata: Detect Delkin Devices compact flash Ben Gardner
2010-03-01 20:12 ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.