* [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
@ 2009-01-27 13:19 Sergei Shtylyov
2009-01-27 13:38 ` Alan Cox
0 siblings, 1 reply; 13+ messages in thread
From: Sergei Shtylyov @ 2009-01-27 13:19 UTC (permalink / raw)
To: bzolnier, jgarzik; +Cc: linux-ide, alan, gdu
When checking for the 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/PI
version support in the word 80 (which the CompactFlash specifications have as
reserved), this having no slightest chance to work on the modern CF cards that
don't have 0x848A in the word 0...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
The patch has been updated to keep Alan feeling safe; there's a hope however
that his paranoia will assume more consistent form. :-)
I'm not sure who should queue this patch... it's against Linus' tree.
include/linux/ata.h | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
Index: linux-2.6/include/linux/ata.h
===================================================================
--- linux-2.6.orig/include/linux/ata.h
+++ linux-2.6/include/linux/ata.h
@@ -731,12 +731,17 @@ static inline int ata_id_current_chs_val
static inline int ata_id_is_cfa(const u16 *id)
{
- if (id[ATA_ID_CONFIG] == 0x848A) /* Standard CF */
+ if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional 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)))
+ /*
+ * CF specs don't require specific value in the word 0 anymore and yet
+ * they forbid to report the ATA version in the word 80 and require the
+ * CFA feature set support to be indicated in the word 83 in this case.
+ * Let's hope that the modern cards at least follow the word 80 rule
+ * because some certainly don't follow the word 83 rule... :-/
+ */
+ if (!id[ATA_ID_MAJOR_VER] &&
+ (id[ATA_ID_COMMAND_SET_2] & 0xC004) == 0x4004)
return 1;
return 0;
}
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 13:19 [PATCH] ide/libata: fix ata_id_is_cfa() (take 3) Sergei Shtylyov
@ 2009-01-27 13:38 ` Alan Cox
2009-01-27 13:49 ` Jeff Garzik
2009-01-27 15:56 ` Mark Lord
0 siblings, 2 replies; 13+ messages in thread
From: Alan Cox @ 2009-01-27 13:38 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: bzolnier, jgarzik, linux-ide, gdu
On Tue, 27 Jan 2009 17:19:52 +0400
Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
> When checking for the 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/PI
> version support in the word 80 (which the CompactFlash specifications have as
> reserved), this having no slightest chance to work on the modern CF cards that
> don't have 0x848A in the word 0...
>
> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Alan Cox <number6@the-village.bc.nu>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 13:38 ` Alan Cox
@ 2009-01-27 13:49 ` Jeff Garzik
2009-01-27 16:09 ` Sergei Shtylyov
2009-01-27 15:56 ` Mark Lord
1 sibling, 1 reply; 13+ messages in thread
From: Jeff Garzik @ 2009-01-27 13:49 UTC (permalink / raw)
To: Alan Cox; +Cc: Sergei Shtylyov, bzolnier, linux-ide, gdu
Alan Cox wrote:
> On Tue, 27 Jan 2009 17:19:52 +0400
> Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
>
>> When checking for the 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/PI
>> version support in the word 80 (which the CompactFlash specifications have as
>> reserved), this having no slightest chance to work on the modern CF cards that
>> don't have 0x848A in the word 0...
>>
>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
> Acked-by: Alan Cox <number6@the-village.bc.nu>
I'll send it upstream, thanks all!
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 13:49 ` Jeff Garzik
@ 2009-01-27 16:09 ` Sergei Shtylyov
2009-01-27 16:21 ` Sergei Shtylyov
0 siblings, 1 reply; 13+ messages in thread
From: Sergei Shtylyov @ 2009-01-27 16:09 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Alan Cox, bzolnier, linux-ide, gdu
Jeff Garzik wrote:
>>> When checking for the 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/PI
>>> version support in the word 80 (which the CompactFlash specifications
>>> have as
>>> reserved), this having no slightest chance to work on the modern CF
>>> cards that
>>> don't have 0x848A in the word 0...
>>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>> Acked-by: Alan Cox <number6@the-village.bc.nu>
> I'll send it upstream, thanks all!
Hold up please, Mark gave us an example that it doesnt recognize because
it does report the ATA version in word 80.
MBR, Sergei
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 16:09 ` Sergei Shtylyov
@ 2009-01-27 16:21 ` Sergei Shtylyov
0 siblings, 0 replies; 13+ messages in thread
From: Sergei Shtylyov @ 2009-01-27 16:21 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Jeff Garzik, Alan Cox, bzolnier, linux-ide, gdu
Hello, I wrote:
>>>> When checking for the 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/PI
>>>> version support in the word 80 (which the CompactFlash
>>>> specifications have as
>>>> reserved), this having no slightest chance to work on the modern CF
>>>> cards that
>>>> don't have 0x848A in the word 0...
>>>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>>> Acked-by: Alan Cox <number6@the-village.bc.nu>
>> I'll send it upstream, thanks all!
> Hold up please, Mark gave us an example that it doesnt recognize
> because it does report the ATA version in word 80.
s/it/his card/
MBR, Sergei
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 13:38 ` Alan Cox
2009-01-27 13:49 ` Jeff Garzik
@ 2009-01-27 15:56 ` Mark Lord
2009-01-27 16:16 ` Sergei Shtylyov
2009-01-27 17:41 ` [PATCH] ide/libata: fix ata_id_is_cfa() (take 3) Mark Lord
1 sibling, 2 replies; 13+ messages in thread
From: Mark Lord @ 2009-01-27 15:56 UTC (permalink / raw)
To: Alan Cox; +Cc: Sergei Shtylyov, bzolnier, jgarzik, linux-ide, gdu
Alan Cox wrote:
> On Tue, 27 Jan 2009 17:19:52 +0400
> Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
>
>> When checking for the 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/PI
>> version support in the word 80 (which the CompactFlash specifications have as
>> reserved), this having no slightest chance to work on the modern CF cards that
>> don't have 0x848A in the word 0...
>>
>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
> Acked-by: Alan Cox <number6@the-village.bc.nu>
..
Any chance you two could figure out this one below?
It *is* a CF card, but doesn't show up as such.
/dev/sda:
044a 3fff 0000 000f 0000 0240 003f 03bc
0000 0000 5052 4554 4543 2020 2020 2020
3031 3233 3541 4545 0002 0002 0004 3230
3038 3038 3035 4346 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 2020
2020 2020 2020 2020 2020 2020 2020 8001
0000 0300 0000 0200 0000 0007 3fff 000f
003f 3c4f 00ec 0100 0000 03bc 0000 0007
0003 0078 0078 0078 0078 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0010 0000 700b 400c 4003 0001 0000 0003
207f 0001 0000 0000 fffe 600f 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0009 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
81f4 0000 0000 0092 001b 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 15:56 ` Mark Lord
@ 2009-01-27 16:16 ` Sergei Shtylyov
2009-01-27 16:18 ` Mark Lord
2009-01-28 7:51 ` Dmitry Gryazin
2009-01-27 17:41 ` [PATCH] ide/libata: fix ata_id_is_cfa() (take 3) Mark Lord
1 sibling, 2 replies; 13+ messages in thread
From: Sergei Shtylyov @ 2009-01-27 16:16 UTC (permalink / raw)
To: Mark Lord; +Cc: Alan Cox, bzolnier, jgarzik, linux-ide, gdu
Mark Lord wrote:
>>> When checking for the 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/PI
>>> version support in the word 80 (which the CompactFlash specifications
>>> have as
>>> reserved), this having no slightest chance to work on the modern CF
>>> cards that
>>> don't have 0x848A in the word 0...
>>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>> Acked-by: Alan Cox <number6@the-village.bc.nu>
> ..
> Any chance you two could figure out this one below?
> It *is* a CF card, but doesn't show up as such.
> /dev/sda:
> 044a 3fff 0000 000f 0000 0240 003f 03bc
> 0000 0000 5052 4554 4543 2020 2020 2020
> 3031 3233 3541 4545 0002 0002 0004 3230
> 3038 3038 3035 4346 2020 2020 2020 2020
> 2020 2020 2020 2020 2020 2020 2020 2020
> 2020 2020 2020 2020 2020 2020 2020 8001
> 0000 0300 0000 0200 0000 0007 3fff 000f
> 003f 3c4f 00ec 0100 0000 03bc 0000 0007
> 0003 0078 0078 0078 0078 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0010 0000 700b 400c 4003 0001 0000 0003
ATA device, with non-removable media
Model Number: CF
Serial Number: PRETEC 01235AEE
Firmware Revision: 20080805
Standards:
Supported: 4
Likely used: 6
Here's what I was afraid of: it does report the ATA revision in word 80.
Otherwise, it seems pretty standard modern CF. What are we to do now, Alan?
> 207f 0001 0000 0000 fffe 600f 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0009 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 81f4 0000 0000 0092 001b 0000 0000 0000
Here are the words 160-167.; word 163 reports PIO6 and MWDMA3 max, PIO6
selected...
MBR, Sergei
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 16:16 ` Sergei Shtylyov
@ 2009-01-27 16:18 ` Mark Lord
2009-01-27 16:26 ` Sergei Shtylyov
2009-01-28 7:51 ` Dmitry Gryazin
1 sibling, 1 reply; 13+ messages in thread
From: Mark Lord @ 2009-01-27 16:18 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Alan Cox, bzolnier, jgarzik, linux-ide, gdu
Sergei Shtylyov wrote:
> Mark Lord wrote:
>
>>>> When checking for the 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/PI
>>>> version support in the word 80 (which the CompactFlash
>>>> specifications have as
>>>> reserved), this having no slightest chance to work on the modern CF
>>>> cards that
>>>> don't have 0x848A in the word 0...
>
>>>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
>>> Acked-by: Alan Cox <number6@the-village.bc.nu>
>
>> ..
>
>> Any chance you two could figure out this one below?
>> It *is* a CF card, but doesn't show up as such.
>
>> /dev/sda:
>
>> 044a 3fff 0000 000f 0000 0240 003f 03bc
>> 0000 0000 5052 4554 4543 2020 2020 2020
>> 3031 3233 3541 4545 0002 0002 0004 3230
>> 3038 3038 3035 4346 2020 2020 2020 2020
>> 2020 2020 2020 2020 2020 2020 2020 2020
>> 2020 2020 2020 2020 2020 2020 2020 8001
>> 0000 0300 0000 0200 0000 0007 3fff 000f
>> 003f 3c4f 00ec 0100 0000 03bc 0000 0007
>> 0003 0078 0078 0078 0078 0000 0000 0000
>> 0000 0000 0000 0000 0000 0000 0000 0000
>> 0010 0000 700b 400c 4003 0001 0000 0003
>
> ATA device, with non-removable media
> Model Number: CF
> Serial Number: PRETEC 01235AEE
> Firmware Revision: 20080805
> Standards:
> Supported: 4
> Likely used: 6
>
> Here's what I was afraid of: it does report the ATA revision in word
> 80. Otherwise, it seems pretty standard modern CF. What are we to do
> now, Alan?
>
>> 207f 0001 0000 0000 fffe 600f 0000 0000
>> 0000 0000 0000 0000 0000 0000 0000 0000
>> 0000 0000 0000 0000 0000 0000 0000 0000
>> 0000 0000 0000 0000 0000 0000 0000 0000
>> 0000 0000 0000 0000 0000 0000 0000 0000
>> 0009 0000 0000 0000 0000 0000 0000 0000
>> 0000 0000 0000 0000 0000 0000 0000 0000
>> 0000 0000 0000 0000 0000 0000 0000 0000
>> 0000 0000 0000 0000 0000 0000 0000 0000
>> 81f4 0000 0000 0092 001b 0000 0000 0000
>
> Here are the words 160-167.; word 163 reports PIO6 and MWDMA3 max,
> PIO6 selected...
..
Note that, in hdparm-prerelease, I now do something very similar
to the libata patch, except I skip the !id[82] check. This works
for this card, at least.
-ml
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 16:18 ` Mark Lord
@ 2009-01-27 16:26 ` Sergei Shtylyov
2009-01-27 16:28 ` Mark Lord
0 siblings, 1 reply; 13+ messages in thread
From: Sergei Shtylyov @ 2009-01-27 16:26 UTC (permalink / raw)
To: Mark Lord; +Cc: Alan Cox, bzolnier, jgarzik, linux-ide, gdu
Mark Lord wrote:
>>>>> When checking for the 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/PI
>>>>> version support in the word 80 (which the CompactFlash
>>>>> specifications have as
>>>>> reserved), this having no slightest chance to work on the modern CF
>>>>> cards that
>>>>> don't have 0x848A in the word 0...
>>>>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>>>> Acked-by: Alan Cox <number6@the-village.bc.nu>
>>> ..
>>> Any chance you two could figure out this one below?
>>> It *is* a CF card, but doesn't show up as such.
>>> /dev/sda:
>>> 044a 3fff 0000 000f 0000 0240 003f 03bc
>>> 0000 0000 5052 4554 4543 2020 2020 2020
>>> 3031 3233 3541 4545 0002 0002 0004 3230
>>> 3038 3038 3035 4346 2020 2020 2020 2020
>>> 2020 2020 2020 2020 2020 2020 2020 2020
>>> 2020 2020 2020 2020 2020 2020 2020 8001
>>> 0000 0300 0000 0200 0000 0007 3fff 000f
>>> 003f 3c4f 00ec 0100 0000 03bc 0000 0007
>>> 0003 0078 0078 0078 0078 0000 0000 0000
>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>> 0010 0000 700b 400c 4003 0001 0000 0003
>> ATA device, with non-removable media
>> Model Number: CF
>> Serial Number: PRETEC 01235AEE
>> Firmware Revision: 20080805
>> Standards:
>> Supported: 4
>> Likely used: 6
>> Here's what I was afraid of: it does report the ATA revision in
>> word 80. Otherwise, it seems pretty standard modern CF. What are we to
>> do now, Alan?
Mark, too bad that you haven't joined the argument before...
>>> 207f 0001 0000 0000 fffe 600f 0000 0000
>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>> 0009 0000 0000 0000 0000 0000 0000 0000
>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>> 81f4 0000 0000 0092 001b 0000 0000 0000
>> Here are the words 160-167.; word 163 reports PIO6 and MWDMA3 max,
>> PIO6 selected...
> ..
> Note that, in hdparm-prerelease, I now do something very similar
> to the libata patch, except I skip the !id[82] check. This works
!id[80] you mean?
> for this card, at least.
> -ml
MBR, Sergei
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 16:26 ` Sergei Shtylyov
@ 2009-01-27 16:28 ` Mark Lord
0 siblings, 0 replies; 13+ messages in thread
From: Mark Lord @ 2009-01-27 16:28 UTC (permalink / raw)
To: Sergei Shtylyov; +Cc: Alan Cox, bzolnier, jgarzik, linux-ide, gdu
Sergei Shtylyov wrote:
> Mark Lord wrote:
>
>>>>>> When checking for the 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/PI
>>>>>> version support in the word 80 (which the CompactFlash
>>>>>> specifications have as
>>>>>> reserved), this having no slightest chance to work on the modern
>>>>>> CF cards that
>>>>>> don't have 0x848A in the word 0...
>
>>>>>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
>>>>> Acked-by: Alan Cox <number6@the-village.bc.nu>
>
>>>> ..
>
>>>> Any chance you two could figure out this one below?
>>>> It *is* a CF card, but doesn't show up as such.
>
>>>> /dev/sda:
>
>>>> 044a 3fff 0000 000f 0000 0240 003f 03bc
>>>> 0000 0000 5052 4554 4543 2020 2020 2020
>>>> 3031 3233 3541 4545 0002 0002 0004 3230
>>>> 3038 3038 3035 4346 2020 2020 2020 2020
>>>> 2020 2020 2020 2020 2020 2020 2020 2020
>>>> 2020 2020 2020 2020 2020 2020 2020 8001
>>>> 0000 0300 0000 0200 0000 0007 3fff 000f
>>>> 003f 3c4f 00ec 0100 0000 03bc 0000 0007
>>>> 0003 0078 0078 0078 0078 0000 0000 0000
>>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>>> 0010 0000 700b 400c 4003 0001 0000 0003
>
>>> ATA device, with non-removable media
>>> Model Number: CF
>>> Serial Number: PRETEC 01235AEE
>>> Firmware Revision: 20080805
>>> Standards:
>>> Supported: 4
>>> Likely used: 6
>
>>> Here's what I was afraid of: it does report the ATA revision in
>>> word 80. Otherwise, it seems pretty standard modern CF. What are we
>>> to do now, Alan?
>
> Mark, too bad that you haven't joined the argument before...
>
>>>> 207f 0001 0000 0000 fffe 600f 0000 0000
>>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>>> 0009 0000 0000 0000 0000 0000 0000 0000
>>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>>> 0000 0000 0000 0000 0000 0000 0000 0000
>>>> 81f4 0000 0000 0092 001b 0000 0000 0000
>
>>> Here are the words 160-167.; word 163 reports PIO6 and MWDMA3 max,
>>> PIO6 selected...
>
>> ..
>
>> Note that, in hdparm-prerelease, I now do something very similar
>> to the libata patch, except I skip the !id[82] check. This works
>
> !id[80] you mean?
..
Yeah.. I've lost the libata patch posting now.
Pity we cannot also check for the signature of 0x044a (word-0)
as per the CFA spec, but I believe I tried that once here and
found some hard disks that got misidentified as a result. :)
Thanks for poking at this stuff.
-ml
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 16:16 ` Sergei Shtylyov
2009-01-27 16:18 ` Mark Lord
@ 2009-01-28 7:51 ` Dmitry Gryazin
2009-01-28 15:03 ` ide/libata: fix ata_id_is_cfa() .. hdparm-9.10 Mark Lord
1 sibling, 1 reply; 13+ messages in thread
From: Dmitry Gryazin @ 2009-01-28 7:51 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Mark Lord, Alan Cox, bzolnier, jgarzik, linux-ide, navy-patches
On Tuesday 27 January 2009 07:16:38 pm Sergei Shtylyov wrote:
> Mark Lord wrote:
> >>> When checking for the 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/PI
> >>> version support in the word 80 (which the CompactFlash specifications
> >>> have as
> >>> reserved), this having no slightest chance to work on the modern CF
> >>> cards that
> >>> don't have 0x848A in the word 0...
> >>>
> >>> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> >>
> >> Acked-by: Alan Cox <number6@the-village.bc.nu>
> >
> > ..
> >
> > Any chance you two could figure out this one below?
> > It *is* a CF card, but doesn't show up as such.
> >
> > /dev/sda:
> >
> > 044a 3fff 0000 000f 0000 0240 003f 03bc
> > 0000 0000 5052 4554 4543 2020 2020 2020
> > 3031 3233 3541 4545 0002 0002 0004 3230
> > 3038 3038 3035 4346 2020 2020 2020 2020
> > 2020 2020 2020 2020 2020 2020 2020 2020
> > 2020 2020 2020 2020 2020 2020 2020 8001
> > 0000 0300 0000 0200 0000 0007 3fff 000f
> > 003f 3c4f 00ec 0100 0000 03bc 0000 0007
> > 0003 0078 0078 0078 0078 0000 0000 0000
> > 0000 0000 0000 0000 0000 0000 0000 0000
> > 0010 0000 700b 400c 4003 0001 0000 0003
>
> ATA device, with non-removable media
> Model Number: CF
> Serial Number: PRETEC 01235AEE
> Firmware Revision: 20080805
> Standards:
> Supported: 4
> Likely used: 6
My Kingston CF reports:
Model Number: CF CARD 1GB
Serial Number: CF1GB 00004DCA
Firmware Revision: 20070709
> Here's what I was afraid of: it does report the ATA revision in word
> 80. Otherwise, it seems pretty standard modern CF. What are we to do now,
> Alan?
>
> > 207f 0001 0000 0000 fffe 600f 0000 0000
> > 0000 0000 0000 0000 0000 0000 0000 0000
> > 0000 0000 0000 0000 0000 0000 0000 0000
> > 0000 0000 0000 0000 0000 0000 0000 0000
> > 0000 0000 0000 0000 0000 0000 0000 0000
> > 0009 0000 0000 0000 0000 0000 0000 0000
> > 0000 0000 0000 0000 0000 0000 0000 0000
> > 0000 0000 0000 0000 0000 0000 0000 0000
> > 0000 0000 0000 0000 0000 0000 0000 0000
> > 81f4 0000 0000 0092 001b 0000 0000 0000
>
> Here are the words 160-167.; word 163 reports PIO6 and MWDMA3 max, PIO6
> selected...
>
> MBR, Sergei
Here is my Kingston CF Card:
044a 078e 0000 0010 0000 0240 003f 001d
bf20 0000 4643 4731 2042 3030 3030 4434
4143 0000 0000 0000 0002 0002 0004 3032
3730 3730 3930 4643 4320 5241 2044 4731
0042 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 8001
0000 0300 0000 0200 0000 0003 078e 0010
003f bf20 001d 0100 bf20 001d 0000 0407
0003 0078 0078 0078 0078 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0001 0000 0002 0001 0000 0002
0000 0000 0000 0000 0000 400f 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
81f4 0000 0000 0492 001b 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
May be we should rely on "CF" in "Model number". This would not cover
all CF cards, but could catch some modern. But anyway we have to collect more
different CF cards statistic first.
Regards, Dmitry Gryazin.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] ide/libata: fix ata_id_is_cfa() (take 3)
2009-01-27 15:56 ` Mark Lord
2009-01-27 16:16 ` Sergei Shtylyov
@ 2009-01-27 17:41 ` Mark Lord
1 sibling, 0 replies; 13+ messages in thread
From: Mark Lord @ 2009-01-27 17:41 UTC (permalink / raw)
To: Alan Cox; +Cc: Sergei Shtylyov, bzolnier, jgarzik, linux-ide, gdu
Mark Lord wrote:
>
> Any chance you two could figure out this one below?
> It *is* a CF card, but doesn't show up as such.
>
> /dev/sda:
> 044a 3fff 0000 000f 0000 0240 003f 03bc
> 0000 0000 5052 4554 4543 2020 2020 2020
> 3031 3233 3541 4545 0002 0002 0004 3230
> 3038 3038 3035 4346 2020 2020 2020 2020
> 2020 2020 2020 2020 2020 2020 2020 2020
> 2020 2020 2020 2020 2020 2020 2020 8001
> 0000 0300 0000 0200 0000 0007 3fff 000f
> 003f 3c4f 00ec 0100 0000 03bc 0000 0007
> 0003 0078 0078 0078 0078 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0010 0000 700b 400c 4003 0001 0000 0003
> 207f 0001 0000 0000 fffe 600f 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0009 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 81f4 0000 0000 0092 001b 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
> 0000 0000 0000 0000 0000 0000 0000 0000
..
Speaking of which.. these cards retail for only $99 delivered (eBay),
in case anyone was looking for a cheap-ish SSD for an older notebook.
Reads at up to 40+MBytes/sec, writes are in the 20MB/sec range.
Cheers
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-01-28 15:03 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-27 13:19 [PATCH] ide/libata: fix ata_id_is_cfa() (take 3) Sergei Shtylyov
2009-01-27 13:38 ` Alan Cox
2009-01-27 13:49 ` Jeff Garzik
2009-01-27 16:09 ` Sergei Shtylyov
2009-01-27 16:21 ` Sergei Shtylyov
2009-01-27 15:56 ` Mark Lord
2009-01-27 16:16 ` Sergei Shtylyov
2009-01-27 16:18 ` Mark Lord
2009-01-27 16:26 ` Sergei Shtylyov
2009-01-27 16:28 ` Mark Lord
2009-01-28 7:51 ` Dmitry Gryazin
2009-01-28 15:03 ` ide/libata: fix ata_id_is_cfa() .. hdparm-9.10 Mark Lord
2009-01-27 17:41 ` [PATCH] ide/libata: fix ata_id_is_cfa() (take 3) Mark Lord
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).