Skip to contentSkip to conversation

ata: Detect Delkin Devices compact flash

PATCH Applied Ben Gardner 2 participants 2 messages Feb 23, 2010 – Mar 1, 2010 libata

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: Detect Delkin Devices compact flash

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

---

include/linux/ata.h +2 -1
@@ -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
Applied
#1 lore raw
Quoted 7 lines · Ben Gardner

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)

Quoted 7 lines

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

applied